Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: Perlplexation - foreach shoulda Known

by Riales (Hermit)
on Apr 13, 2012 at 22:04 UTC ( #965005=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for (0 .. 10) {
        my $outer_elem = $_;
    ...
            do_something($outer_elem, $inner_elem);
        }
    }
    
  2. or download this
    foreach my $elem1 (@array1) {
        my $outer_idx = $.;
    ...
            # Blablabla...
        }
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (18)
As of 2015-09-03 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred temperature scale is:










    Results (121 votes), past polls