On Tuesday, September 2, 2003, at 01:52 PM, Dan Muey wrote:

if($mystr =~ m/^exactstr$/) { print 'Ye haw it matches!'; }

This isn't a pattern, this is an equality test. I would consider the above a poor use of Regular Expressions. $mystr =~ /^exactstr$/ is identical to $mystr eq 'exactstr' except the second is a lot more efficient.


The $mystr =~ /^exactstr$/i match you hint at but don't show is a different story though and would be a reasonable way to test case insensitive equality, I think.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to