On Jan 22, 2008 10:42 AM, Jonathan Mast <[EMAIL PROTECTED]> wrote:
> I have a perl module that extensively uses a variable named "$main", which
> is apparently bound to the script that calls the library.
>
> I can't find where the exact semantics of this automagic variable defined.
snip

There is no variable named $main unless you create it.  You may be
mistaking the main package in variables like $main::foo.  Also, if the
module is not using the strict pragma then it is not required to
"create" the variable.  It will be created on the first reference to
it (whitch is why you should always use the strict pragma).

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to