-----Original-Nachricht-----
> Subject: adding \n?
> Date: Wed, 07 Jul 2010 05:30:14 +0200
> From: Noah <noah-l...@enabled.com>
> To: Perl Beginners <beginners@perl.org>

> Hi there,
> 
> I want to add '\n' to each element of @contact_list.
> what are my options for doing so?
> 

Hi,

Perl's map function does that for you.

$ perl -e '@x=(1,2,3);@y=map {$_."\n"} @x;print for @y'
1
2
3


Freemail @t-online.de ist immer dabei: Per Handy Browser auf E-Mails zugreifen 
oder über POP3 und IMAP Mails aufs Handy laden!
http://www.t-online.de/freemail/mobil



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to