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

Re: Foreach Loops

by kelan (Deacon)
on Mar 17, 2005 at 13:45 UTC ( [id://440369]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for (my $x = 0; $x < $#arr; $x++) {}
    #                  ^^^^^^^
    
  2. or download this
    for (my $x = 0; $x <= $#arr; $x++) {}
    #                  ^^
    ...
    #                    ^
    # when used in scalar context, '@arr' returns the number of
    # elements in @arr
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-03-28 10:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found