Or, if you don't care about tr///:
if ($s =~ /M/) { print "case1\n"; } else { print "case2\n"; }
In reply to Re^4: Pattern matching regex problem
by bibliophile
in thread Pattern matching regex problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |