The more I read this thread the more I dont understand why you dont maintain a hash that is structured with only two levels, location and then building. Then your code looks like:
my $code=$locations{$location}{$building}{code};
Also something to keep in mind (although its not hugely critical) each deref takes time, each hash lookup takes time, each unique key takes space. So in some circumstances your dotted approach would result in considerably more memory being taken up by the keys. Not only that but determinisitc traversal of your dotted form of the tree would be quite expensive as compared to the non dotted form. Overall I wouldnt go this route unless i had really strong justification to do so. And style isnt a strong justification IMO :-)
In reply to Re^3: Dotted hash access
by demerphq
in thread Dotted hash access
by sfink
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |