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

Or you can just do this:

open(FILE, "<" . $file) or die ("Can't open file: $!"); my @lines = <FILE>; close FILE;