Put the ones to skip into a Hash not an array
my %skip; $skip{$_}++ for qw(skip_me and_me and_this_too); foreach my $line (@csv) { if ($csv->parse($line)) { my @fields = $csv->fields; $offer{retailer}=$fields[0]; next if $skip{$offer{retailer}}; $offer{productid}=$fields[1]; } }
Cheers,
R.
In reply to Re: in_array and skipping foreach
by Random_Walk
in thread in_array and skipping foreach
by webchalkboard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |