I think you mean "string context", not "scalar context". Scalar context per se doesn't turn a reference to anything.

And the numeric value of a string "ARRAY(0x155513c)" is zero:

perl -e "$x = []; print qq{$x}+0"
In the original case the reference is evaluated in numerical context, not first in string and then numerical. And in numerical context reference evaluates to the address.

Jenda
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
   -- Rick Osborne


In reply to Re^2: addresses of objects by Jenda
in thread addresses of objects by BioGeek

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