in reply to eq vs. ==
Maybe this answers your question:
$val eq '2'
String compare string value of $val with string '2'.
$val == '2'
Convert string '2' to number, and numerically compare with numeric value of $val
$val == 2
Compare numeric 2 with numeric value of $val
If a string starts with a number, its numeric value will be that number. Consider the following examples:
True because 0 == 0$ perl -e "print 'a' == 'b'"
Not true because 0 != 1$ perl -e "print 'a' == '1b'"
True because 0 == 0$ perl -e "print 'a' == 'b1'"
Liz
In Section
Seekers of Perl Wisdom