Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Explain lexical variable scratchpads

by velusamy (Monk)
on Dec 06, 2008 at 04:36 UTC ( [id://728484]=perlquestion: print w/replies, xml ) Need Help??

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

Hi Monks, Can anyone please explain about lexical variable scratchpads?

Replies are listed 'Best First'.
Re: Explain lexical variable scratchpads
by ikegami (Patriarch) on Dec 06, 2008 at 05:59 UTC
    "scrathpads" or just "pads" are where lexical (my) variables are stored internally. Each function has one for each level of recursion it's been called. It's a kind of array, where each element is one of the function's "my" variables.
Re: Explain lexical variable scratchpads
by Lawliet (Curate) on Dec 06, 2008 at 04:46 UTC
      Dear Monk, Sorry, My intention of scratchpad is not that. I read the following context from a link. "Lexical variables (those tagged with my) aren't listed in the symbol table at all. Every block and subroutine gets a list of one or more arrays of variables called scratchpads (typically one, but more if the subroutine recurses). Each lexical variable is assigned one slot from a scratchpad; in fact, different types of variables with the same name - $spud and %spud, say - occupy different slots". In above context I didn't understand about scratchpads. Can anyone please explain about scrathpads on this context?

        Haha oh. Whoops. Could you please edit the title of your original post (OP) to clarify the issue?

        I'm so adjective, I verb nouns!

        chomp; # nom nom nom

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://728484]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-04-23 14:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found