Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Foreach Loops

by hubb0r (Pilgrim)
on Mar 15, 2005 at 18:56 UTC ( [id://439714]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach my $line (@arr) {
       ## stuff goes here;
    }
    
  2. or download this
    for (my $x = 0; $x < $#arr; $x++) {
        my $line = $arr[$x];
        ##  stuff goes here;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://439714]
Approved by Tanktalus
Front-paged by davidj
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-19 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found