while (<$file>) { push (@data, "$_\n"); } print @data;