Search code examples
perlref

What does the hexadecimal number in a reference to an array, hash, etc. indicate?


When printing a reference to an array, hash, etc, what is that hexadecimal number in brackets?

perl -e 'print []'

Gives an output like: ARRAY(0x9acb830)

What is 0x9acb830 exactly? If I print the same ref again, this number changes.


Solution

  • If you print the same ref again the number should remain the same; the number is the actual address of the SV header for the referred to thingy.