in reply to When hashes aren't enough

if you don't want to do OO than building a hash of hashes could be pretty easy to work with. You could do something like this:
my %vehicles = ( Car=>{ Wheels=>4, Doors=>4, Color=>"Blue", }, Bike=>{ Wheels=>2, Color=>"Red", } ); # work with the attributes while (my($vehicle,$attributes)=each(%vehicles)){ print "Let me tell you about a $vehicle\n"; if(my $color = $attributes->{Color}){ print "A $vehicle is $color\n"; } if(my $wheels = $attributes->{Wheels}){ print "A $vehicle has $wheels wheels\n"; } }