[...] $fh1 = $sftp->open("$file") or die $sftp->error; while (<$fh1>) { print if /ORA-/ || /Fehler/ || /ORACLE-Fehler/; # my $last = $_; # print $last; } [...]