in reply to reading file into an array

my @array = <FILE>;

would be what you were aiming at.