in reply to short method to print age.

One way could be to extract the childrens ages into an array using map before printing them. Perhaps also consider printf to format the output.
#!/usr/bin/perl use warnings; use strict; my %alex = ( age => 30, children => [ {age => 2}, {age => 5}, ], ); my @kids = map{$_->{age}} @{$alex{children}}; print "Alex children are $kids[0] and $kids[1] years old\n"; print "Alex is $alex{age} himself\n\n"; # or printf( qq{Alex's children are %d and %d years old\nAlex is %d himself\n}, @kids, $alex{age} );