foreach $workfile (@ARGV) { if (-e $workfile){ open (SENTFILE, ">>$workfile.ok"); printf ("aktuelle Input-Datei: %s\n", $workfile); open (INFILE, $workfile) or die "Datei $workfile nicht gefunden\n"; while ($workline = ){ if (length($workline) > 1 ){ @elemente = split(/#/,$workline); $elemente[0]=~ s/^ *(.*) *$/$1/g; chomp ($elemente[16]);