$ $ perl -wE 'say "ouch" if "foo\n" =~ /^foo$/' ouch $ perl -wE 'say "ouch" if "foo\n" eq "foo"' $ # no output
So they are not the same... which one do you want?
In reply to Re: Regular expression matching or eq, which is faster?
by moritz
in thread Regular expression matching or eq, which is faster?
by athanasia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |