Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: If I was forced to use only one kind of loop for the rest of my days it would be a

by Roger_B (Scribe)
on Oct 01, 2005 at 13:35 UTC ( #496638=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    // UNTESTED
        for(int a = 1; a<10; a++)
        {
            printf("%d\n",a);
        }
    
  2. or download this
    // UNTESTED
    // UPDATED: de-obfuscated
    ...
                a++;
            }
        }
    
  3. or download this
    # UNTESTED
    for (;EXPR;) BLOCK   # leave first and third EXPRs blank to be
    ...
         VAR = shift @list) BLOCK            # somewhat like
                                             # foreach VAR (LIST) BLOCK
                                             # without the usual aliasing
    
  4. or download this
    perl -MO=Deparse -e "for (;<>;){print}"
    while (defined($_ = <ARGV>)) {
        print $_;
    }
    -e syntax OK
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2019-03-19 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How do you Carpe diem?





    Results (92 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!