in reply to Not equal, regular expressions

One problem might be that the `.' is a metacharacter in the regex. Try quoting it:
if ($file !~ /\Q$line\E$/) {
and see what happens.

-Mark

Replies are listed 'Best First'.