Perl read file FAQ: How can I read a file into an array in Perl (Or, Can you share a Perl read file into array example?)
One of the really cool things about Perl is that it's super-easy to read a file into a Perl array. This is really handy any time you need to read a file for any reason.
A Perl read file into array example
If you want to read a file into a Perl array, you actually only need one line of code, like this: