Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: how to seperate array after a certain number of elements?

by smokemachine (Hermit)
on Sep 20, 2007 at 21:27 UTC ( [id://640232]=note: print w/replies, xml ) Need Help??


in reply to how to seperate array after a certain number of elements?

try this (destructive):
perl -e '@a=1..100;while(@a){push@b,[@a[0..4]];@a=@a[5..$#a];}'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2024-04-18 15:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found