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

Re: stack array to array of arrays

by Random_Walk (Prior)
on Oct 17, 2013 at 13:25 UTC ( [id://1058625]=note: print w/replies, xml ) Need Help??


in reply to stack array to array of arrays

Just for fun

perl -MData::Dumper -lE "@r=(1..40);$s=5;$n[($i-$i%$s)/$s][$i++%$s]=$r[$i]for@r;say Dumper\@n

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 09:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found