Try:

print STDOUT join "\n", @array;

Brad


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of George
Gallen
Sent: Thursday, June 12, 2003 1:46 PM
To: [EMAIL PROTECTED]
Subject: Reverse of Chomp...


Is there a way to reverse chop/chomp
I'm reading <STDIN> into an array, then
   chomping off the last character of each of the
   array elements.
Now I'd like to write the array back out
  to <STDOUT>, but I want to put the \n's back between
  each of the lines.
Aside from looping through the array, and
   print each element followed by a \n to <STDOUT>
   is there an easier way like:
   unchop(@array) ; <STDOUT> = @array ;
I guess I could write a short subroutine, but didn't
want to re-invent the wheel, even though there isn't
much re-inventing in that routine.
Thanks
George

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to