in reply to Two-dimensional hash problem
$gra{$k} is a reference, not a hash. Enclose it in %{...} like %{$gra{$k}}.