use strict; use warnings; my %nested = ( first => { one => 'two' }, second => { three => 'four' } ); pass_the_hash_1(%nested, 'second argument'); pass_the_hash_2(%nested, 'second argument'); sub pass_the_hash_1 { my %first_argument = shift; my $second_argment = shift; print "$first_argument{first}{one} should be two\n"; } sub pass_the_hash_2 { my %first_argument = shift; my $second_argment = shift; print "$second_argment should be second argument\n"; }