<?xml version="1.0" encoding="windows-1252"?>
<node id="324897" title="Re: Re: Closure on Closures" created="2004-01-29 03:28:32" updated="2005-08-08 21:09:33">
<type id="11">
note</type>
<author id="171588">
BrowserUk</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;i&gt;is it some special kind of variable on the 10th line of our last example?&lt;/i&gt;&lt;/blockquote&gt;


&lt;code&gt;
10: $::PROGRAM = basename $0;
&lt;/code&gt;

&lt;p&gt;You don't indicate which of the two variables in that line that you haven't encountered before.

&lt;ol&gt;&lt;li&gt;&lt;code&gt;$::PROGRAM&lt;/code&gt;
&lt;p&gt;This is a package global variable in main. &lt;code&gt;$::var&lt;/code&gt; is equivalent to &lt;code&gt;$main::var&lt;/code&gt;.
&lt;p&gt;See one of [broquaint]'s other tutorial's [id://211441] for more information if that was the source of your question.

&lt;p&gt;The all upper case is a loose convention used to indicate global variables.

&lt;/li&gt;&lt;li&gt;&lt;code&gt; $0 &lt;/code&gt;
&lt;p&gt;This is documented in [http://perldoc.com/perl5.8.0/pod/perlvar.html|perlvar]. Search for the text "$PROGRAM_NAME".

&lt;/li&gt;&lt;/ol&gt;

&lt;p&gt;HTH.

&lt;div class="pmsig"&gt;
&lt;div class="pmsig-171588"&gt;
&lt;hr /&gt;
&lt;font size=1 &gt;
&lt;div&gt;Examine what is said, not who speaks.&lt;/div&gt;
"Efficiency is intelligent laziness." -David Dunham&lt;br /&gt;
"Think for yourself!" - [Abigail-II|Abigail] &lt;br /&gt;
[http://antwrp.gsfc.nasa.gov/apod/ap031001.html|Timing (and a little luck) are everything!]&lt;br /&gt;

&lt;/p&gt;&lt;/font&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
268891</field>
<field name="parent_node">
324896</field>
</data>
</node>
