|
|
| more useful options | |
| PerlMonks |
Re^2: Stupid mistakes I repeatedly makeby demerphq (Chancellor) |
| on Mar 27, 2005 at 13:39 UTC ( [id://442676]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
ambrus taught me a good mnenonic - the negated comparison for the regex binding operator is !~, which has the same order as !=, and thus, the regex binding operator must be =~. I use the same mnemonic but word it a bit differently: I tend to translate $a == $b to "a is b", so I translate $a =~ /Pattern/ as "a is like Pattern", and since ! is traditionally "not" I translate $a !~/Pattern/ as "a not like Pattern". Thus the "=~" operator to me is the "is like" operator and the "!~" operator is the "not like" operator.
--- demerphq
In Section
Meditations
|
|
||||||||||||||||||||||||