Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Foreach Loops

by kelan (Deacon)
on Mar 17, 2005 at 13:45 UTC ( #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
Node Status?
node history
Node Type: note [id://440369]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2017-05-01 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (545 votes). Check out past polls.