- or download this
sub f {
my ($AoH) = @_;
...
# do something with $hashref
}
}
- or download this
...
# somewhere in your code
...
# and at some other point
f([\%hash]);
...
- or download this
sub g {
my ($arrayref_containing_just_one_hashref) = @_;
my $hashref = $arrayref_containing_just_one_hashref->[0];
# do something with $hashref
}