Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: what do you infer from an array reference?

by kcott (Archbishop)
on Feb 07, 2017 at 00:01 UTC ( [id://1181243]=note: print w/replies, xml ) Need Help??


in reply to what do you infer from an array reference?

G'day purnak,

Years ago, when working on 32-bit systems, I used to get hexidecimal numbers (such as you posted: 9458b48) that would fit into 32 bits. Now, on a 64-bit system, I get hexidecimal numbers that won't fit into 32 bits (but will fit into 64 bits):

$ perl -E 'say []' ARRAY(0x7fd8278040b0)

Of course, 9458b48 will also fit into 64 bits. I'd be very wary of making any inferences regarding the system architecture based on the hexidecimal number.

Although you only asked about array references, there are many other types of references, that follow the same pattern. Here's some examples:

$ perl -E 'say for [], {}, \"", sub {}' ARRAY(0x7ff6d60040b0) HASH(0x7ff6d602bf70) SCALAR(0x7ff6d602c948) CODE(0x7ff6d602c960)

The ref function has a more complete list; perlref has, in its own words, "complete documentation about all aspects of references".

Finally, as an adjunct to ++Eily's reply, here's a recent post where the equality of references was used.

— Ken

Replies are listed 'Best First'.
Re^2: what do you infer from an array reference?
by purnak (Acolyte) on Feb 08, 2017 at 07:28 UTC
    Thanks Ken.. This was informative.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1181243]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found