Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: how to push 5th element from one array to another array

by gmargo (Hermit)
on Oct 28, 2009 at 02:29 UTC ( #803560=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @fifth =  @arr[ map {$_*5-1} 1..$#arr+4/5 ];
    
  2. or download this
    my @fifth =  @arr[ map {$_*5-1} 1..($#arr+4)/5 ];
    
  3. or download this
    my @fifth =  @arr[ map {$_*5-1} 1..($#arr+1)/5 ];
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2022-12-10 03:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?