Think about Loose Coupling | |
PerlMonks |
Re: how to add more intelligence to grep functionalityby blazar (Canon) |
on Jan 12, 2006 at 11:28 UTC ( [id://522675]=note: print w/replies, xml ) | Need Help?? |
You already received a lot of replies. The common consensus seems to be that you just mistook shell patterns for regular expressions. It seems to me that no one has stressed enough that you seem to have a poor understanding of grep: it is made for grepping across lists, and indeed you can pass it a list of exactly one element - only, you generally just don't want to! So you either want:
or
or even
But then I have the feeling that you really wanted to ask about something different, since in all earnestness I couldn't make 100% sense of your wording. Incidentally, to define that long list of "words", you may use use qw// to great advantage, improving readability, typing speed and possibly reducing the risk of typos.
In Section
Seekers of Perl Wisdom
|
|