Do you know where your variables are? | |
PerlMonks |
Re: pattern match -vs- *ix grepby VSarkiss (Monsignor) |
on Apr 07, 2005 at 14:07 UTC ( [id://445675]=note: print w/replies, xml ) | Need Help?? |
Can anyone tell me of a better way to do this?Yes. Check your arguments. This little snippet could cause havoc if called with Take a look at Two-arg open() considered dangerous for details. My point is that specialized utilities that have been around for a long time, like grep, have more than speed going for them. In general, they'll handle edge cases better. If you want to demonstrate "the power of Perl", remember that power can be used for good or evil. :-)
In Section
Seekers of Perl Wisdom
|
|