in reply to ne vs. ! eq
Precedence. See perlop: ! $s1 eq $s2 is the same as (!$s1) eq $s2, and not !( $s1 eq $s2 ), as B::Deparse will tell you:
$ perl -MO=Deparse,-p -e 'if (! $s1 eq $s2) {}' if (((!$s1) eq $s2)) { (); }
You'll need to write either if ( !( $s1 eq $s2 ) ), if ( not $s1 eq $s2 ), unless ( $s1 eq $s2 ), or of course if ( $s1 ne $s2 ).
In Section
Seekers of Perl Wisdom