# open the file and quit if we can't * open(FH,'foo.txt') or die $!; # store the contents into an array * my @line = ; # close the file close FH; # for each element in the array, print it * for my $line (@line) { # start for loop # print it print $line; } # end of for loop # exit exit;