<?xml version="1.0" encoding="windows-1252"?>
<node id="96818" title="Re: my $foo if 0; is a bug" created="2001-07-15 03:42:30" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="17251">
MeowChow</author>
<data>
<field name="doctext">
You make a very good point, and one that I whole-heartedly agree with. As I said, I wouldn't use this sort of thing in real code, but I thought it's worth demonstrating that there are cases where it's quite useful to be able to declare a variable of static lifetime without having to create an enclosing scope. Yes, I see that it can be done with tie, though I usually avoid tied variables after having had a few nasty experiences with their performance. The requisite [caller] voodoo makes a tied implementation even less appealing.
&lt;pre&gt;
  &lt;a href="/index.pl?node=MeowChow"&gt; MeowChow                                   &lt;/a&gt;
               s aamecha.s a..a\u$&amp;owag.print&lt;/pre&gt;</field>
<field name="root_node">
96784</field>
<field name="parent_node">
96802</field>
</data>
</node>
