good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
ne vs. ! eqby boerni (Novice) |
on Feb 25, 2020 at 13:34 UTC ( [id://11113400]=perlquestion: print w/replies, xml ) | Need Help?? |
boerni has asked for the wisdom of the Perl Monks concerning the following question:
Hey Monks
I never realized perl behaves like this. There is a difference between (! 'a' eq 'b') and ('a' ne 'b').
prints:
The "correct" ($s1 ne $s2) works as expected. But why does (! $s1 eq $s2) not work? Probably there is a simple explanation but I don't know it... Maybe one of you Monks can explain this. Thank you
Back to
Seekers of Perl Wisdom
|
|