Hi Teddy
This works :-)
for (sort byname keys %$ref) { print "$_ has the name $ref->{$_}{name} and has $ref->{$_}{age} years\n"; } sub byname { {$ref->{$a}{name} cmp $ref->{$b}{name}} }
Chris
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>