Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: appending arrays

by duff (Parson)
on Nov 19, 2003 at 18:14 UTC ( [id://308369]=note: print w/replies, xml ) Need Help??


in reply to Re: appending arrays
in thread appending arrays

Any of the GreatOnes want to show us a more elegant solution?

I'm not a GreatOne, but here's how I might have done it assuming that I know the arrays are exactly the same size:

my $n = $#array1; my @array3 = map { $array1[$_] . $array2[$n-$_] } 0..$n;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-25 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found