#! perl -slw use strict; chomp( $_ = ); print "($_,"; while( ) { chomp; $_ = "'$_'"; last if eof(DATA); print "$_,"; } print "$_)"; __DATA__ one two three four