[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Omaha.pm] Parsing a Text File
I have an array with multiple text patterns as its members. I also have a large text file with lines that may or may not have as part of the line the same patterns that are stored as values in the array
I'm having problems figuring out an elegant way to iterate the file and do a regex match based on the values that are stored in the array.
Can anyone point me in the right direction on a good way to regex match a file and only output the lines that contain one of the patterns in the array? The text file is large, so iterating the file mutiple times is not a good solution for me.
Thanks,
Drew