in reply to Grep lines from a text file, compare to an array using regex?

if you want to grep on whole fields, you might be able to use a hash.

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)