Perl-Sensitive Sunglasses | |
PerlMonks |
Re: hashes of hashesby Utilitarian (Vicar) |
on Feb 10, 2011 at 14:05 UTC ( [id://887454]=note: print w/replies, xml ) | Need Help?? |
A hash stores things by key and value vary similar to the way the Berkeley sleepycat DB engine does, so I guess you'd do it that way. you would have a searchable key and the value could be a hash reference with the names of the other fields as keys of the referenced hashes.
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
In Section
Seekers of Perl Wisdom
|
|