Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I thought it was funny how he first labelled one way of doing things as a 'mistake', and then proceeded to make the 'mistake' himself: if ($text =~ m/\.txt$/) Why not use substr ($text, -4, 4); to extract the .txt, and then eq to compare it? The reason is, of course, that we write code for readability, not efficiency, for the most part. See "obfuscation" :) In reply to Re: Re: Regex Misuse
by kal
|
|