Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Keeping a Count in foreach

by insensate (Hermit)
on Jun 17, 2002 at 15:30 UTC ( [id://175103]=note: print w/replies, xml ) Need Help??


in reply to Keeping a Count in foreach

Would something like:
$i=0; foreach $e (@s) { print $i++." $e\n"; }
suffice? If not, could you clarify your intent?
Thanks, Jason

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-28 18:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found