foreach (qw/hasha hashb hashc/) { @keys = keys eval('%' . $_); print "There are " . scalar(@keys) . " keys here for '$_'\n"; }