⭐
in reply to
How can we read each line from a file onto an array?
my @lines= do { local(*ARGV); @ARGV="filename.txt"; <> };
is one way to avoid having to
open
the file explicitly, check for errors, and report them.
Comment on
Re: how can we read each line from a file onto an array?
Download
Code
In Section
Seekers of Perl Wisdom