Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://496638]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-03-28 16:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found