while(($key, $value) = each(%$href)) { $$href{$key}[1][0][0] = 1; ... print "$key/1/0/0 = $$href{$key}[1][0][0]\n"; }