in reply to Handling both string and numeric comparisons
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.
|
|---|