sub g { my ($arrayref_containing_just_one_hashref) = @_; my $hashref = $arrayref_containing_just_one_hashref->[0]; # do something with $hashref }