#!/usr/bin/perl use warnings; use strict; my $fname = "test"; my $keyword = "flupp"; my $fh; open($fh, "<", $fname); my $seen = 0; my $line = <$fh>; while ($line) { chomp($line); if ($line eq $keyword) { $seen = 1; } if ($seen == 1) { print "$line\n"; } $line = <$fh>; } close($fh);