sub check_text { open my $fh, "<", "/home/nikster/supertext" or die "Unable to read from supertext : $!"; while (1) { for(my $i = 0; $i <= $#lines; $i++) { if $_ (m/$lines[$i]->[0]|$lines[$i]->[5]|$lines[$i]->[8]/ && $_ !~ m/"(F)"/) { print "alles scheint OK zu sein!\n"; } } } } close $fh;