use IO::File; my $fh = IO::File->new( 'foobar.txt', 'r' ); while ( my $line = $fh->readline ) { print $line if $fh->input_line_number > 3; }