$ref = { "person" => { "name" => "Bob" } }; # this works print $ref->{person}{name}; # this doesn't $n = '{person}{name}'; print $ref->$n;