in reply to variable sees it, array doesn't - stumped!
>perl -wMstrict -le "my $s = ''; if ($s != '') { print 'not equal' } " Argument "" isn't numeric in numeric ne (!=) at -e line 1. Argument "" isn't numeric in numeric ne (!=) at -e line 1. >perl -wMstrict -le "my $s = 'foo'; if ($s != '') { print 'not equal' } " Argument "" isn't numeric in numeric ne (!=) at -e line 1. Argument "foo" isn't numeric in numeric ne (!=) at -e line 1. >perl -wMstrict -le "my $s = 0; if ($s != '') { print 'not equal' } " Argument "" isn't numeric in numeric ne (!=) at -e line 1. >perl -wMstrict -le "my $s = [ 'array', 'ref' ]; if ($s != '') { print 'not equal' } " Argument "" isn't numeric in numeric ne (!=) at -e line 1. not equal
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: variable sees it, array doesn't - stumped!
by tilly (Archbishop) on Dec 31, 2008 at 20:04 UTC | |
by shrdlu (Novice) on Jan 01, 2009 at 14:44 UTC |