go ahead... be a heretic | |
PerlMonks |
Re^3: Regex problemby edan (Curate) |
on Feb 16, 2005 at 12:25 UTC ( [id://431541]=note: print w/replies, xml ) | Need Help?? |
I downvoted your post, and I'll tell you why - IT'S WRONG! Why would you give somebody a regex solution when they clearly need to test for equality!? What if $index contained regex metacharacters? In short, I think it's a bad habit to use an anchored regex when you mean "equals". perl provides us with == and eq for a reason. Use them.
In Section
Seekers of Perl Wisdom
|
|