#!/usr/bin/perl use strict; use warnings; my $filename='./test.txt'; open(my $fh, '<', $filename) || die("ERROR open $filename ($!)\n"); while(my $line=<$fh>) { print $line; } close($fh);