in reply to Re^2: hash refferences
in thread hash refferences

What Corion said is right.

%temp is actually a container - think of a bucket. You can fill this container (putting water into the bucket), and empty it, which is what %temp = undef does.

Or you can but your bucket into the cupboard, (pushing it to an array), and take a new bucket (declaring %temp inside the loop).

In this real-world analogy you can see that there's a huge difference between these two things.

Replies are listed 'Best First'.
Re^4: hash references
by Anonymous Monk on Aug 22, 2008 at 06:44 UTC
    which is what %temp = undef does. No, thats what undef %temp does, big difference