use strict; use warnings; use Data::Dumper; my $array_of_hashes_ref = [ { h1key1 => "h1val1", h1key2 => "h1val2", }, { h2key1 => "h2val1", h2key2 => "h2val2", h2key3 => "h2val3", }, ]; print Dumper( $array_of_hashes_ref ); test_sub( $array_of_hashes_ref ); sub test_sub { my $aoh_ref = shift; print Dumper( $aoh_ref); }