What about hash keys- are they duplicated for each object of the same type?

Yes.

Er, no. Hash keys are generally shared across all hashes, as the following shows. Using the same key for lots of objects uses less memory than a different key for each one:
$ perl588 -e 'push @f, bless { "foo$_",0 } for 100000..999999; system + "ps -flp $$"' F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY +TIME CMD 0 S davem 6040 17980 81 85 0 - 43121 wait 19:05 pts/2 00:0 +0:04 perl5 $ perl588 -e 'push @f, bless { "foo999999",0 } for 100000..999999; sy +stem "ps -flp $$"' F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY +TIME CMD 0 S davem 6045 17980 96 85 0 - 34173 wait 19:06 pts/2 00:0 +0:03 perl5 $

Dave.


In reply to Re^2: Perl Objects, Internal Representation -- How?? by dave_the_m
in thread Perl Objects, Internal Representation -- How?? by bratwiz

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.