Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Join 2 arrays horizontally

by hdb (Monsignor)
on Mar 04, 2019 at 13:04 UTC ( #1230835=note: print w/replies, xml ) Need Help??


in reply to Join 2 arrays horizontally

Just for fun: a solution that is probably wasteful and I am not even sure it will always work (as a minimum both arrays have to be of the same length).

splice @array1, @array2, 0, pop @array2 while @array2;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2022-05-16 19:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (63 votes). Check out past polls.

    Notices?