Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: How's your Perl?

by hessef (Monk)
on Oct 27, 2003 at 15:37 UTC ( [id://302410]=note: print w/replies, xml ) Need Help??


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 16: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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2024-04-19 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found