in reply to Non-deprecated way to access multi-level hashes
push @Names, $names{$_}{realname} foreach keys %names;
or
push @Names, $_->{realname} foreach values %names;
or
my @Names = map { $_->{realname} } values %names;
The sigil to use is the type being returned.
%hash # The entire hash is a hash. $hash{key} # An element of the hash is a scalar.
See the "Direct" column of this table.
|
|---|