hifirock has asked for the wisdom of the Perl Monks concerning the following question:

what is "$::example" variable stands for? is it global package variable? pls suggest me.

Replies are listed 'Best First'.
Re: $:: variable
by psini (Deacon) on Jul 11, 2008 at 08:24 UTC

    $::var is the same as $main::var. It is a shorthand for referring a global var in package main.

    Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."

Re: $:: variable
by Anonymous Monk on Jul 11, 2008 at 07:01 UTC
    C:\>perl -MO=Deparse,-p -e"$::example" $example; -e syntax OK C:\>perl -MO=Deparse,-p -e"package foo;$::example" package foo; $main::example; -e syntax OK