G'day shalgham,
Welcome to the monastery.
A representative example of both your array and file would help comprehension.
It sounds like you'll want to create a hash from your array, e.g.
my %hash = map { $_ => 1 } @array;
Then process your file based on the hash, e.g.
while (<$filehandle>) { my @row_elements = split /$pattern/; next unless $hash{$row_elements[$i]}; # Process "wanted" row here }
With more information to work with, I probably could have provided a better answer. See the guidelines in "How do I post a question effectively?": a better question gets a better answer.
-- Ken
In reply to Re: searching an array member in file header and print a column
by kcott
in thread searching an array member in file header and print a column
by shalgham
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |