in reply to puzzling behaviour of keys function

Thanks for the very rapid replies. Ok, so using Data::Dumper in line 4 of script 2 gives
OUTPUT: $VAR1 = { 'c' => 1, 'wrong' => {}, 'a' => 1, 'b' => 1, 'd' => 1 };
So.. print keys %{$hash{'wrong'}} causes an element to be added to %hash, the key is 'wrong' and the value is a reference to an empty, anonymous hash. Have I got that correct?

Replies are listed 'Best First'.
Re^2: puzzling behaviour of keys function
by friedo (Prior) on Dec 08, 2004 at 15:18 UTC
    Yep.