I have this code
foreach my $key (keys %ad_grp) {
# Do something
}
which works.
How would the same look like, if I don\'t have
foreach my $key (keys %$ad_grp_ref) {
...
}
Perl::Critic and daxim recommend the style
foreach my $key (keys %{ $ad_grp_ref }) {
...
}
out of concerns for readability and maintenance (so that you don't need to think hard about what to change when you need to use %{ $ad_grp_obj[3]->get_ref() } instead of %{ $ad_grp_ref })