{ no strict 'refs'; foreach (qw/hasha hashb hashc/) { @keys = keys %$_; print "There are @keys here"; } }
But the better answer is a question: why are you doing this? Why not just store the data in one hash to begin with, for example $hash{a}{key1} instead of $hasha{key1}?
In reply to Re: Using the value of a scalar as a hash
by sgifford
in thread Using the value of a scalar as a hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |