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

Re: while ()

by bofh_of_oz (Hermit)
on Jun 07, 2005 at 17:06 UTC ( [id://464397]=note: print w/replies, xml ) Need Help??


in reply to while ()

I intended to use while (1), honest! <grin>

It is quite interesting to see that sometimes mistyping can lead to unexpected discoveries in the language syntax...

Surprisingly, I couldn't find anything about this syntax in Perl or C on the Net... But from (working, heh) code, it seems that an empty condition is evaluated as true...

Here's what I found that might be related. It's from description of perl5db, the Perl debugger:

... %postponed Saves breakpoints for code that hasn't been compiled yet. Keys are sub +routine names, values are: * compile - break when this sub is compiled * break +0 if <condition> - break (conditionally) at the start of +this routine. The condition will be '1' if no condition was specified +. ...

--------------------------------
An idea is not responsible for the people who believe in it...

Replies are listed 'Best First'.
A graceful error
by tlm (Prior) on Jun 08, 2005 at 06:34 UTC

    It is quite interesting to see that sometimes mistyping can lead to unexpected discoveries in the language syntax...

    Mind

    Richard Wilbur

    Mind in its purest play is like some bat
    That beats about in caverns all alone,
    Contriving by a kind of senseless wit
    Not to conclude against a wall of stone.

    It has no need to falter or explore;
    Darkly it knows what obstacles are there,
    And so may wave and flitter, dip and soar
    In perfect courses through the blackest air.

    And has this simile a like perfection?
    The mind is like a bat. Precisely. Save
    That in the very happiest intellection
    A graceful error may correct the cave.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-23 15:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found