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."