<?xml version="1.0" encoding="windows-1252"?>
<node id="302325" title="Re: Re: How's your Perl?" created="2003-10-26 23:04:45" updated="2005-08-10 15:28:34">
<type id="11">
note</type>
<author id="281137">
davido</author>
<data>
<field name="doctext">
Though I'm almost certain that's what the OP had in mind, it relies on a bug rather than a documented feaure.  For that reason I happen to like this solution to question #5 of the OP's quiz:
&lt;p&gt;
&lt;strike&gt;&lt;code&gt;
sub{my$x=\$x};
&lt;/code&gt;&lt;/strike&gt;
&lt;p&gt;
&lt;b&gt;Updated version that creates only one $x:&lt;/b&gt;
&lt;p&gt;
&lt;code&gt;
sub { my $x; $x = \$x; }
&lt;/code&gt;
&lt;p&gt;
The anonymous sub is created and immediately falls out of existance because it's not passed to a scalar variable.  And yet $x never disappears because its reference count is always going to be 1; it refers to itself.
&lt;p&gt;
It probably doesn't qualify as a static, and is pretty much useless, but it meets the definition of static that the OP gave.
&lt;p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-281137"&gt;
&lt;br&gt;&lt;p&gt;Dave&lt;/p&gt;&lt;br&gt;
&lt;font size=-1&gt;
"If I had my life to live over again, I'd be a plumber."  -- Albert Einstein&lt;/font&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
302287</field>
<field name="parent_node">
302316</field>
</data>
</node>
