in reply to an easier way with grep, map, and/or sort?
I recognize that the code should be:
but am a big tool, and so did not check carefully enough before I posted. Apologies :\foreach (sort keys %institution_table) { $institution_table{$_}{"fortyfive_fifty"} ++ if (45 < $age and $age <= 50); $institution_table{$_}{"fifty_fiftyfive"} ++ if (50 < $age and $age <= 55); $institution_table{$_}{"fiftyfive_sixty"} ++ if (55 < $age and $age <= 60); #...and so on up through the 85-90 age bracket }
Thanks again,
--au
In Section
Seekers of Perl Wisdom