<?xml version="1.0" encoding="windows-1252"?>
<node id="812976" title="Re^2: Accessing main::Constant" created="2009-12-16 00:52:16" updated="2009-12-16 00:52:16">
<type id="11">
note</type>
<author id="711414">
nagalenoj</author>
<data>
<field name="doctext">
Thanks.
It works fine.

&lt;p&gt;I need another clarification, 
Is it possible to access a variable in main package like below,&lt;/p&gt;

&lt;code&gt;
package pq;
.
use constant { VAR =&gt; "main::$VAR" };
.
.
sub pr { print main::$VAR; print VAR; }

&lt;/code&gt;
&lt;p&gt; I'm getting error. So I thought, 'As the constants are expanded when compilation, it isn't working as what I expected'. $VAR is a our variable in main package.&lt;/p&gt;</field>
<field name="root_node">
812972</field>
<field name="parent_node">
812973</field>
</data>
</node>
