<?xml version="1.0" encoding="windows-1252"?>
<node id="67032" title="Re: !@#$ $#_" created="2001-03-25 15:05:35" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="3737">
Dominus</author>
<data>
<field name="doctext">
Says [MeowChow]:
&lt;blockquote&gt;&lt;i&gt;
It looks as if any complex sub-expressions /subroutine calls are evaluated in order, and
  variables/references are evaluated last.
&lt;/i&gt;&lt;/blockquote&gt;

That's very astute of you.  It's not exactly what's going on, but it's very close.
For simple variables, Perl pushes what is
effectively a reference onto the stack. 
But for complex ecpressions, Perl must construct the 
new value and push a reference to that instead.  So if
&lt;tt&gt;$i = 2&lt;/tt&gt;, then &lt;tt&gt;$i&lt;/tt&gt; in the list pushes a
reference to &lt;tt&gt;$i&lt;/tt&gt; itself, but &lt;tt&gt;$i + 0&lt;/tt&gt; copies &lt;tt&gt;$i&lt;/tt&gt;
and pushes a reference to the copy of the 2.  If you later change
&lt;tt&gt;$i&lt;/tt&gt;, the first 2 changes but the second one doesn't.&lt;p&gt;

Your original example works the same way.&lt;p&gt;

This could be considered a bug.  It has come up on p5p before,
but I don't remember what the outcome of the discussion was.&lt;p&gt;

Contrary to what [id://66885|chromatic said], it is &lt;i&gt;not&lt;/i&gt; a precedence issue.
Precedence only affects parsing, not execution.
</field>
<field name="root_node">
66880</field>
<field name="parent_node">
66897</field>
</data>
</node>
