<?xml version="1.0" encoding="windows-1252"?>
<node id="478303" title="Re^3: wantarray documentation in 5.8.7" created="2005-07-26 13:31:55" updated="2005-08-13 14:32:35">
<type id="11">
note</type>
<author id="43019">
simonm</author>
<data>
<field name="doctext">
&lt;blockquote&gt;
Now the actual purpose of this thread is to find a form of words that distinguishes these cases, so the docs can be patched to avoid the current inaccuracy which suggests that wantarray is never meaningful at the top level.
&lt;/blockquote&gt;

&lt;p&gt; I would guess, although I have not tested it, that the talk about the "top level" also applies to code entered via &lt;tt&gt;-e&lt;/tt&gt;, even though that's not "a file."

&lt;p&gt; The distinction seems to be about the "main" source code, so I'd say: "wantarray()'s result is unspecified in the top level of &lt;strike&gt;a source file&lt;/strike&gt; &lt;b&gt;a program's main source code&lt;/b&gt;, in a BEGIN , CHECK , INIT or END block, or in a DESTROY method."

&lt;p&gt; Perhaps "main source code" isn't the right phrase, but it's closer to the point than "a source file."</field>
<field name="root_node">
477759</field>
<field name="parent_node">
477779</field>
</data>
</node>
