note
Marshall
Why be more cryptic that you need to be? <br>
Doing so will not be more efficient.
<c>
#!/usr/bin/perl -w
use strict;
my $animals = {
gnu => {
humps => 0,
mascot_for => 'emacs',
},
dromedary => {
humps => 1,
mascot_for => 'perl',
},
camel => {
humps => 2,
mascot_for => 'perl',
},
};
foreach my $critter (keys %$animals)
{
print "$critter "; #camel gnu dromedary
}
print "\n";
foreach my $critter (keys %$animals) #sort if you want to
{
print "$animals->{$critter}{humps} "; #2 0 1
}
print "\n";
</c>
993192
993201