OK, before someone starts complaining:
Yes Perl has an internal type for scalars holding references, so $a_ref would be of that type. But that's not what I meant.
Every @array has already a ref-address for the internal memory location, even before you try assigning it explicitly to a $scalar
DB<8> use Devel::Peek DB<9> @x=(1) DB<10> Dump @x SV = PVAV(0x31c26e0) at 0x31dbe08 <---- REFCNT = 1 FLAGS = () ARRAY = 0x31ff138 FILL = 0 MAX = 3 ARYLEN = 0x0 FLAGS = (REAL) Elt No. 0 SV = IV(0x31dba20) at 0x31dba30 REFCNT = 1 FLAGS = (IOK,pIOK) IV = 1 DB<11> p \@x ARRAY(0x31dbe08) <---- DB<12>
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^6: Having trouble reading in a hash from a referenced array
by LanX
in thread Having trouble reading in a hash from a referenced array
by SergioQ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |