# No.15 Perl Sample (code key - 51) # Learning Perl: Concatenate all lines (全ての行を一行にまとめる) # Tomonori Nagano # Last Update: January 18, 2008 # # This file is encoded in Unicode (UTF-8). If you see gibberish characters, # please re-encode the file in utf-8. # while(<>){ chomp ; # get rid of the end-of-line character $line .= "$_" ; # concatenate lines } print "$line\n" ;