Hmmm no strict, no warnings. Now, that is too bad...#!/usr/bin/perl $infile = @ARGV[0]; $outfile = "OK.txt"; $outfile2 = "ERROR.txt"; @Filter = ('01005;01000','01005;01001','01005;01002','01005;01003'); $zaehler = 0;
Better:open(INFILE, "< $infile") or die "\nDatei $infile konnte nicht geoeffnet werden\n";
and ditto as above wrt the other opens.open my $in, '<', $infile or die "Error message including \$!: $!\n";
Huh?!?while (<INFILE>) { print OUTFILE if /@Filter[0]/; }
In reply to Re: Filter script with pattern and an array
by blazar
in thread Filter script with pattern and an array
by ultibuzz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |