Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
P is for Practical
 
PerlMonks  

Re: Re: How's your Perl?

by hessef (Monk)
on Oct 27, 2003 at 10:37 UTC ( [id://302410]=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: How's your Perl?
in thread How's your Perl?

I couldn't get :foo while1" to work on my PC (Windows, perl 5.8.0).

I could get to work by rewriting it as "1while foo" or "1until!foo".

My own try involved a for loop--no dice. The best I could do was "for(;;foo){};" which is slightly too long.

Replies are listed 'Best First'.
Re: Re: Re: How's your Perl?
by hardburn (Abbot) on Oct 27, 2003 at 11:43 UTC

    I could get to work by rewriting it as "1while foo" or "1until!foo".

    That loop will stop as soon as foo() returns false. The quiz didn't specify that foo() will always return a true value, so you can't assume it.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    :(){ :|:&};:

    Note: All code is untested, unless otherwise stated

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://302410]
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.