@DATA = map "$_\n", split /\n/, $data; # but why add \n when you chomp later?