George Gallen wrote:
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) ; <> = @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


George --


print STDOUT join "\n", @array

or

@array = map {$_.="\n"[EMAIL PROTECTED];

Cheers!

-- mike higgins

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

Reply via email to