http://www.perlmonks.org?node_id=67652


in reply to Populating an array

Set the input record separator to two newlines:
$/ = "\n\n"; # Sets the input record separator to two newlines my @array = <FILE>; # Put the file in an array $/ = "\n"; # Sets the input record separator to one newline (the defau +lt)