use strict; local $| = 1; #Autoflush true my $file = 'c:/cygwin/var/log/setup.log'; die "tail nicht installiert\n" unless qx/which tail/; open(TAIL,"tail -f $file |") or die $!; while(my $line = <TAIL>){ print "$.: $line\n"; print "Gefunden\n" if $line =~ m/DEIN_PATTERN/; } close TAIL; # schließe die Pipe