while(($key, $value) = each(%$href)) { %$href{$key}->[1]->[0]->[0] = 1; #this gives a syntax error %{$href{$key}}->[1]->[0]->[0] = "blah" #gives error print "$key\n"; # but when i do this the code prints all the keys of the reference to the hash. so I assume the the hash was passed through correctly }