in reply to Storing first letter of each element of @p in $x

my $str = join '', map { substr($_, 0, 1) } @p;

In short: each array entry, we take the first letter (substring - starting at 0, for 1 character), join them together with nothing between them, and we get the string. "print $str" would work from here, or whatever you need to do.

Replies are listed 'Best First'.
Re^2: Storing first letter of each element of @p in $x
by renz (Scribe) on Jan 18, 2005 at 16:56 UTC
    Thanks a lot -- that works perfectly.