1. Variables on the pad are not related. A package global $foo and @foo would be synonyms for ${*foo{SCALAR}} and @{*foo{ARRAY}}. On the pad, there's no glob; there's just a scalar referenced by the name $foo (including sigil) and an array referenced by the name @foo (again including sigil).

  2. Whatever floats your boat. If they're the most natural representation - go for it.

Btw, why copypaste code from Symbol rather than use the module itself?

Update/disclaimer: I may be wrong with respect to how the pad works, though the information given is to the best of my knowledg. In the interests of accuracy, following my posting this, I went to research whether this was all really correct. So far I come back empty handed. My fiddling with PadWalker supports the knowledge purported above, but that may not necessarily mean anything. If I'm wrong, please do correct me.

Makeshifts last the longest.


In reply to Re: understanding my() and typeglobs by Aristotle
in thread understanding my() and typeglobs by Ctrl-z

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.