Using aliases to deep points in your data structure can be a good way to shorten your code. I find that when working "deep", I try and use a pointer as a starting point that is as close as is practical to the final values.my %db; tie(%db, 'NDBM_File', ...); my $userdata = \%{$db{userdata}}; my $config = \%{$db{config}}; if ($userdata->{foo} && $config->{key}) { # ... }
In reply to Re: Hashes: long or short?
by tadman
in thread Hashes: long or short?
by L0rdPhi1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |