in reply to pattern matching: why does the following code evaluate true? (and how do i fix it?)
To the OP: the regex matches because the '.' matches an "I" character. Because '.' matches anything. Read perlre.
And try this, if you wanted a literal period ('.'):
if ($key =~ m/\Q$key2\E/) { print " [just another perl hacker] \n"; }
|
|---|