in reply to Filter script with pattern and an array

If you're dealing with csv, then I strongly recommend using Text::CSV_XS. Said this...
#!/usr/bin/perl $infile = @ARGV[0]; $outfile = "OK.txt"; $outfile2 = "ERROR.txt"; @Filter = ('01005;01000','01005;01001','01005;01002','01005;01003'); $zaehler = 0;
Hmmm no strict, no warnings. Now, that is too bad...
open(INFILE, "< $infile") or die "\nDatei $infile konnte nicht geoeffnet werden\n";
Better:
open my $in, '<', $infile or die "Error message including \$!: $!\n";
and ditto as above wrt the other opens.
while (<INFILE>) { print OUTFILE if /@Filter[0]/; }
Huh?!?