I am having an issue with using the input from an array(file) to grep through another array(file). Heres what I have so far. Thanks in advance.
I am attempting to use the 'list' as the criteria to grep through file.csv and put each successful find into a report. Thanks in advance.
open(MYINPUTFILE, "<list");
foreach(<MYINPUTFILE>) {
my $out = `grep -i "$_" /home/file.csv`;
open(OUTPUT, ">>/tmp/file.report");
print OUTPUT "$out\n";
}
close(MYINPUTFILE);
close(OUTPUT);
Dave thank you for the fast reply,
Essentially the list size is 567 lines,
the file.csv size is 6436.
When the code is run the output is 3.6 million lines. Thanks in advance.
The "list" are email addresses, and the file.csv is a list of email addresses. So there can only be 567 matches. Thanks in advance.