http://qs321.pair.com?node_id=1217299


in reply to Print contents of text file line by line

ALWAYS START WITH THESE TWO LINES, FOR HELPFUL ERROR MESSAGES:
use strict; use warnings;
Edit: Wrongish answer deleted...
Edit: This was my mistake, oops:
my @line = <$fh>
STOP REINVENTING WHEELS, START BUILDING SPACE ROCKETS!CPAN 🐪