Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How do I loop through a list two or more elements at a time?

by duff (Parson)
on Feb 04, 2006 at 07:00 UTC ( [id://527898]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for @array -> $a, $b { ... }
    for @array -> $one, $two, $three { ... }
    
  2. or download this
    my @bytwo = map -> $a, $b { [$a,$b] } @array;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-20 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found