#!/usr/bin/perl use strict; use warnings; my @array_of_hashes; Add_key_and_value( $array_of_hashes[0], qw/ James Bond / ); print $array_of_hashes[0]{'James'}, "\n"; # Should print 'Bond'.