harm wrote:

On Wed, Oct 30, 2002 at 06:05:51PM +0800, Philippe M. Chiasson wrote:

For the same reason that running this:
$> perl -e'fork; { $foo = {}; print "$$:$foo\n"}'
1984:HASH(0x804c00c)
1987:HASH(0x804c00c)

produces this for me, every single time I run this program

You are assuming that if (0x804c00c) is equal in different processes,
they must be pointers(or references, or handles) to the same thing. And
it is not the case ;-)

Wait, ins't it the case? That number is supposed to be the location in memory. It seems like these are all pointing to the same hash. I can't explain how that would happen though, based on the code shown here.

- Perrin



Reply via email to