Mega Code Archive

 
Categories / Perl / File
 

To read from a file

while(<FH>){ print; }      # Read one line at a time from file. @lines = <FH>;             # Slurp all lines into an array. print "@lines\n";