open my $fh, '<', $datei or die $!; while my $line ( <$fh> ) { chomp $line; starte_befehl( $line ); } close $fh;