Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: do while loops

by f00li5h (Chaplain)
on Dec 02, 2006 at 06:41 UTC ( [id://587378]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: do while loops
in thread do while loops

do{ ... } while $foo; isn't a loop, it's a block with a postfixed while, so you need to label it to re-do it.

@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;

Replies are listed 'Best First'.
Re^3: do while loops
by Anonymous Monk on Jan 08, 2008 at 08:06 UTC
    sum = 0; for (x = 1; x <= 5; x++) { printf("%d", x); sum = sum + x; printf("The sum is %d", sum); }

      for(;;) loops are ick... they tend to lead to unneeded subscripting and other pesky things

      for my $x (1..4) is far less intent-obfuscated-by-code looking (as far as i see it anyway)

      wait, is that C?

      @_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://587378]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.