|more useful options|
Re: Using grep to pick out lines in a text fileby Cody Pendant (Prior)
|on Dec 19, 2008 at 03:21 UTC||Need Help??|
You're reading the whole file into an array, which you don't need to do, if the entries are on different lines. Just read the document line by line.
I'd also say you're muddled about arrays: for each item in the array, you grep through each item in the array!
This is how I'd do it:
Nobody says perl looks like line-noise any more