http://qs321.pair.com?node_id=869372


in reply to Re: typeglob/symbolic reference question
in thread typeglob/symbolic reference question

I have a follow up question: how do you interpret the left side of the following line:

*{"color"} = sub {#do something};

"Go to the symbol table and look up the name color and grab the glob slot"?

This is from Mastering Perl:

Package    Identifier           Type    Variable

                       +------> SCALAR - $bar
                       |
                       +------> ARRAY  - @bar
                       |
                       +------> HASH   - %bar
                       |
Foo:: -----> bar  -----+------> CODE   - &bar
                       |
                       +------> IO     - file and dir handle
                       |
                       +------> GLOB   - *bar
                       |
                       +------> FORMAT - format names
                       |
                       +------> NAME
                       |
                       +------> PACKAGE