Using while loop to read content
open (FILEHANDLE, "<file.txt") or die ("Cannot open file.txt"); while (<FILEHANDLE>){ print; }