in reply to Re: addresses of objects
in thread addresses of objects

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.

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