Looping through Perl data types +hash+ http://stackoverflow.com/questions/3033/whats-the-safest-way-to-iterate-through-the-keys-of-a-perl-hash bc. % perldoc -f keys % perldoc -f each If you just want the keys and do not plan to ever read any of the values, use keys(): @foreach my $key (keys %hash) { ... }@ If you just want the values, use values(): @foreach my $val (values %hash) { ... }@ If you need the keys and the values, use each(): bc. keys %hash; # reset the internal iterator so a prior each() doesn't affect the loop while(my($k, $v) = each %hash) { ... } #programming - #perl