my @list= ('key1', 'another_key', 'the third'); my %entries= ( 'key1' => 'number one', 'another_key' => '2', 'the third' => "three's a crowd", ); print $entries{ $list[ 2 ] };