Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Appending one array onto another

by sauoq (Abbot)
on Jun 10, 2003 at 09:00 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://264580]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-19 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found