my $print_this = 0; while (<$IN>) { print if $print_this; $print_this = 1 if /^Status of the log/; }