sub f { my ($AoH) = @_; for my $hashref (@$AoH) { # do something with $hashref } }