It will match a pattern, too, not just a literal string. print 1 if $a =~ "fo."; works fine.perl -MO=Deparse -e '$a = "foo"; print 1 if $a =~ "foo"' $a = 'foo'; print 1 if $a =~ /foo/;
Neat.
In reply to Re: Naked quotes work like m//?
by friedo
in thread Naked quotes work like m//?
by samtregar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |