in reply to Equality operators
Perl numifies strings when a number is required. A string that matches /(\d+)\D/ for example simply becomes the integer contained in $1, or 0 if ! defined $1. '1foo' becomes 1. 'foo1' becomes 0.