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...
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|