Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by un-chomp (Scribe)
on Sep 19, 2007 at 17:10 UTC ( [id://639930]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @myMainArray = 
        map { [ $myArray[$_] .. $myArray[$_+4] ] } 
        grep { !($_ % 5) } 0 .. $#myArray;
    
  2. or download this
    my @myMainArray = 
        map  { 
    ...
            : [ $myArray[$_] .. $myArray[-1] ] 
        } 
        grep { !($_ % 5) } 0 .. $#myArray;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-23 07:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found