# Suppose I know the hash has at least two entries, and # it's freshly restarted # Process first entry my($tag, $val) = each %hash) ; do_something($tag, $val); #Process second entry ($tag, $val) = each %hash; do_something($tag, $val); more_processing();