while () { push (@lines, $_); } #### while () { chomp; # removes the newline from $_ push (@lines, $_); }