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

For and foreach...

by Elgon (Curate)
on Jan 20, 2001 at 20:14 UTC ( [id://53222]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for i = 1 to 10
    myarray(i) = myarray(i) + 1
    next i
    
  2. or download this
    my $i;
    my @array = (1, 5, 6, 9, 57);
    ...
    {
        ++$array[$i];
    }
    
  3. or download this
    foreach $bar(@bar)
    {
        ++$bar;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found