in reply to how to populate array with lines from text file?
in thread Answer: how to populate array with lines from text file?

A nice simplification would be:

my @lines = <FH>;