There's more than one way to do things | |
PerlMonks |
Re: line by line match on an array of stringsby vdrab (Initiate) |
on Jan 11, 2008 at 02:57 UTC ( [id://661781]=note: print w/replies, xml ) | Need Help?? |
Hi,
What exactly do you mean by "see if there's a match against any of the strings in the array"? Do you just have to check for "a" match?
Just thinking loud (I don't know what the data is or where it came from), but would it be an option to sort the array, and look for matches using binary search? That would save you a fair lot of processing (assuming the sorting can be done offline).
v.
In Section
Seekers of Perl Wisdom
|
|