#!/usr/bin/perl # Note: file random.txt must be in same directory, or else # must specify an absolute path open(TXT, "; # get all the lines close(TXT); # close file again print "The file contains:\n"; print @lines;