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];}'