chomp(@slurp = <>); print @slurp; #### $text = do { local $/; <>}; $text =~ s/\n//g; # for some \n print $text;