Date sent: Tue, 1 Jul 2003 00:56:10 -0700 (PDT) From: "Ling F. Zhang" <[EMAIL PROTECTED]> Send reply to: [EMAIL PROTECTED] Subject: combining array to scalar To: [EMAIL PROTECTED]
> say I have array: > @a=["I","LOVE","PERL"] > I would like to make a scalar: > $b="I Love Perl\n" > > can I do this with a simple one-liner? Assuming you meant @a=("I","LOVE","PERL"); $b = join(' ', map {ucfirst(lc($_))} @a) . "\n"; print $b; Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]