If I'm doing an exact match, which is faster: a regexp match or a string compare. In other words, which one of the following two is faster, or are they comparable?
A. if ($string =~ /^pattern$/) ... B. if ($string eq "pattern") ... Does the length of the pattern matter? Thanks, -Nilanjan
