in reply to Re^2: Traversing a hash of hashes of hashes
in thread Traversing a hash of hashes of hashes
extra braces are genally not needed to do the dereference
# plain hash note parens() my %plain = (a=>1,b=>2); # an hash reference note braces {} my $ref = {c=>3,d=>4}; #dereferencing example foreach my $k ( keys %$ref ) # is the same of foreach my $k ( keys %{$ref} )
Generally braces in %{$ref} are not needed because perl knows that there is only one possible way to dereference it.
For more example see tye's tutorial References quick reference
L*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Traversing a hash of hashes of hashes
by 1nickt (Canon) on Mar 29, 2017 at 12:32 UTC | |
by BillKSmith (Monsignor) on Mar 29, 2017 at 14:19 UTC | |
|
Re^4: Traversing a hash of hashes of hashes
by kcorj2244 (Novice) on Mar 29, 2017 at 12:07 UTC | |
by Discipulus (Canon) on Mar 29, 2017 at 12:16 UTC |