Perl question regarding memory locations and variables

FP

Diamond Member
Feb 24, 2005
4,568
0
0
If you print a reference it is converted to a scalar context and the memory location is printed, ex:

my $f = { 'foo' => 'bar' };
HASH(0x98e6de8)

Does anyone know if 0x98e6de8 is the actual memory location in RAM?

I am running into a problem where two hashes (objects) seem to occupy the same memory location when printed out like the above example but in different simultaneous processes. It almost seems like the address listed is a mapped address.

 

Venix

Golden Member
Aug 22, 2002
1,084
3
81
Each process has its own independent address space, so it's valid (and common) for two processes to store something at the same virtual address.

Exactly what problem are you having?