Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: Help understand why this grep does not workby LanX (Saint) |
on Nov 02, 2013 at 15:54 UTC ( [id://1060948]=note: print w/replies, xml ) | Need Help?? |
if speed matters you should better consider something like building a hash for array2 for simple lookups or at least a complex OR-ed regex looping just once over array2.
edit
think I spotted (and corrected) a bug in your logic, you forgot to anchor to string start '^' in your grep regex.
Cheers Rolf ( addicted to the Perl Programming Language)
In Section
Seekers of Perl Wisdom
|
|