Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Closure on Closures

by bhappy (Scribe)
on Jan 29, 2004 at 07:49 UTC ( #324896=note: print w/ replies, xml ) Need Help??


in reply to Closure on Closures

is it some special kind of variable on the 10th line of our last example? it doesn't look like other variables i used to. and i was not able to find anything like that in perlvar.


Comment on Re: Closure on Closures
Re: Re: Closure on Closures
by BrowserUk (Pope) on Jan 29, 2004 at 08:28 UTC
    is it some special kind of variable on the 10th line of our last example?
    10: $::PROGRAM = basename $0;

    You don't indicate which of the two variables in that line that you haven't encountered before.

    1. $::PROGRAM

      This is a package global variable in main. $::var is equivalent to $main::var.

      See one of broquaint's other tutorial's Of Symbol Tables and Globs for more information if that was the source of your question.

      The all upper case is a loose convention used to indicate global variables.

    2.  $0

      This is documented in perlvar. Search for the text "$PROGRAM_NAME".

    HTH.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    Timing (and a little luck) are everything!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://324896]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2015-07-02 02:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls