Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Appending one array onto another

by sauoq (Abbot)
on Jun 10, 2003 at 09:00 UTC ( #264580=note: print w/replies, xml ) Need Help??


in reply to Appending strings from one array onto strings of another

$_ .= shift @d for @z; # Elegant, but destroys @d. my $i; $_ .= $d[$i++] for @z; # Less elegant, no destruction.

I really don't care for that second one. I'd probably prefer the first one you gave over it. But, I offer it in the name of TIMTOWTDI anyway.

-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re^2: Appending one array onto another
by Aristotle (Chancellor) on Jun 10, 2003 at 22:00 UTC
    sub { $_ .= shift for @z }->(@d);
    *grin*

    Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://264580]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2020-07-08 05:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?