use strict; use warnings; my ($number, $string) = (5, "hello"); print 1 if $number eq $string; #ok print 2 if $number == $string; #Argument "hello" isn't numeric in nume +ric eq (==) at C:\w.pl line 6.
In reply to Re: Handling both string and numeric comparisons
by holli
in thread Handling both string and numeric comparisons
by perl_devel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |