#!/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} );