in reply to Two-dimensional hash problem

First thing I notice is the lack of $ in the {i} on the fourth-last line (first line inside the inner for loop).

Second thing I notice is your indentation. It's a bit much.

Third thing I notice is that keys requires a hash, not a hash ref. The inner for loop should be:

for my $i (keys %{$gra{$k}})
You need to dereference that reference.

Replies are listed 'Best First'.
Re^2: Two-dimensional hash problem
by nyk (Novice) on Nov 04, 2005 at 21:46 UTC
    Thanks a lot! The "i" instead of "$i" was a mistake when I simplified the problem from my code for the this forum, I know it's wrong.