in reply to eq vs. ==
and of course, the potential confusion with..print "==" if $a == ($b * $c);
Basically, not all equality comparisons are string-based. In my 'perl mindset', if $a == "2", where the number is quoted, immediately begs the question as to which type of comparison is wanted...$a = "2.0"; print "eq" if $a eq "2"; # Nope print "==" if $a == 2; # Yup
Cheers, Ben
|
|---|