$ cat j.pl use strict; my $j; if (not defined $j || scalar @$j == 0) { print "yup\n"; }
It's a precedence issue. What you've got there is if ( (not ( (defined $j) || (scalar @$j == 0) ) ) Use parentheses. my $j; if ((not defined $j) || (scalar @$j == 0)) { print "yup\n"; } Or even more idiomatically: if ( !$j || !@$j ) xoxo, Andy -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance