use strict; use warnings; open my $fh, .... or die "Err: $!"; while (my $line = <$fh>) { print $line; } close $fh;