Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: array looping with foreach

by Roy Johnson (Monsignor)
on Jan 18, 2008 at 16:20 UTC ( [id://663083]=note: print w/replies, xml ) Need Help??


in reply to array looping with foreach

See this subthread about each for arrays (and my relatively trivial implementation).

The ways you've listed are pretty standard for using for, with the second being somewhat preferred, IMO.

Update: if you use method #1, put the increment in a continue block.


Caution: Contents may have been coded under pressure.

Log In?
Username:
Password:

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

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

    No recent polls found