#!/usr/bin/perl; use strict; use warnings; use feature qw/ say /; my %people = ( 1 => { first_name => 'Bob', last_name => 'Smith', topic => 'Anthropology' }, 2 => { first_name => 'Sandy', last_name => 'Smith', topic => 'Sociology' }, 3 => { first_name => 'Tom', last_name => 'Sanders', topic => 'English' }, 4 => { first_name => 'Tina', last_name => 'Lacy', topic => 'Social Work' }, 5 => { first_name => 'Anthony', last_name => 'Sanders', topic => 'English' }, ); my @last_names = map { $_->{'last_name'} } values %people; say for sort @last_names; __END__