for my $key (keys %hash) {
my $value_key = "@{[values %{$hash{$key}}]}";
}
gives you an error because the
%{...} in
%{$hash{$key}} is attempting to treat the value of
$hash{$key} as a hash ref - but it's really a scalar, as you say you want. So replace
%{$hash{$key}} with
%hash to make it work. I see the other post had a double-nested hash, which is why you would need this particular syntax.
It also stores "@{[...]}" in a scalar used as a hash slice - normally you wouldn't need this and could just say values %hash. Hope this helps at all...