You probably want to say something like this: if( grep { $number4 == $_ } 1, 2 ) {...
use List::Util 'any'; # ......... if( any { $number4 == $_ } 1, 2 ) {...
Will have Argument "1,2" isn't numeric in numeric eq <==> ....
Or more simply... if( $number4 == 1 || $number4 == 2 ) { ...
Worked without warning, since $number4 is a list. Thanks
In reply to Re^2: Perl compare
by waytoperl
in thread Perl compare
by waytoperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |