open(FH,"log_fantastic") or dir ("Couldnt open file: $!"); while(my $line = <FH>) { next if (/STATUS_ID: 10 /); print; } close(FH);