You could slurp and split the file, too; to get a list of the lines in a file, you could do:
local $/;
my @lines = split("\n", <IN>);
That 'local $/;' line makes $/, the input record separator, locally undefined so you can 'slurp' the whole file rather than a line at a time.