use warnings; use strict; my $filename = '...'; # specify the file name here open my $fh, '<', $filename or die "can't open $filename: $! "; while ( defined( $_ = <$fh> ) ) { print $_ unless $. == 1 or eof; } close $fh or die "can't close $filename: $!";