In both case, we have scalars of the same type (PVIO). But just like an IV can hold more than one kind of data, PVIO can contain one of two types of handles. I'll clarify that in my table.

By the way, you didn't show the difference, so here goes:

$ perl -MDevel::Peek -we'open FH,$^X; Dump *FH{IO}' SV = IV(0x7564a8) at 0x7564b0 REFCNT = 1 FLAGS = (TEMP,ROK) RV = 0x7693f0 SV = PVIO(0x76ccb8) at 0x7693f0 REFCNT = 2 FLAGS = (OBJECT) STASH = 0x768b68 "IO::File" IFP = 0x763b30 OFP = 0x0 DIRP = 0x0 LINES = 0 PAGE = 0 PAGE_LEN = 60 LINES_LEFT = 0 TOP_GV = 0x0 FMT_GV = 0x0 BOTTOM_GV = 0x0 TYPE = '<' FLAGS = 0x0 $ perl -MDevel::Peek -we'opendir DH,"."; Dump *DH{IO}' SV = IV(0x759d18) at 0x759d20 REFCNT = 1 FLAGS = (TEMP,ROK) RV = 0x76cc78 SV = PVIO(0x770528) at 0x76cc78 REFCNT = 2 FLAGS = (OBJECT) STASH = 0x76c3d8 "IO::File" IFP = 0x0 OFP = 0x0 DIRP = 0x7a7330 LINES = 0 PAGE = 0 PAGE_LEN = 60 LINES_LEFT = 0 TOP_GV = 0x0 FMT_GV = 0x0 BOTTOM_GV = 0x0 TYPE = '\0' FLAGS = 0x0

In reply to Re^3: Where to find info on low level perl internals names? by ikegami
in thread Where to find info on low level perl internals names? by Anonymous Monk

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.