in reply to Read from a file one line at a time?
Assuming you've already opened the filehandle FILE you can read all the lines into a list with
my @lines=<File>;
or read one line at a time with
while (<FILE>){ my $line=$_; }
there are more compact ways to do the latter, as well.
|
---|
In Section
Seekers of Perl Wisdom