> : =~ has no real world equivalent, and in fact I don't know how to
> : pronounce it in English so that $x =~ /a/ makes sense.
>
> Yes, that's all pretty much on the mark.
Not true, IMO. In math, =~ is used to indicate "rough equivalence".
(Actually, the ~ goes on top of the =, but this is a minor difference
considering you can't type it that way.) This same meaning I think is
easily applied here:
$x =~ /a/; # $x is roughly equivalent to a
I use this mneumonic to clear up the difference between these regularly
and people seem to be able to grasp it easily:
== exact equality
=~ rough equality
!= not exact equality
!~ not rough equality
I think that =~ and !~ are very representative of their functions in
matches. I'm actually surprised people find this so confusing,
personally. eq and ne are far more confusing.
Now, one could argue that since we already have m// and s/// there's no
reason that you shouldn't just write:
if ( $x == m/stuff/ ) { ... }
$str = s/$old/$new/gi;
Since s/// doesn't really return anything super-useful right now
anyways. But if we're going to go down this road we should axe eq and
ne, since this is something Perl should be able to figure out just using
== and !=.
-Nate