in reply to Grep lines from a text file, compare to an array using regex?
Just be sure to always lowercase the keys to be case insensitive.
kind of:
$hash{lc($key)}=$line; # for file to search print @hash{@to_find}; # @to_find from grep-file
If possible I'd prefer this over the hassle to avoid regex-metacharacters.
YMMV! =)
Cheers Rolf
(addicted to the Perl Programming Language)
|
|---|