open file, "< readfile.txt"; @filecontent = ; for $f (@filecontent){ print "$f \n" ; } close file;