in reply to Looping with hashes?

perldoc -q sort and perldoc -f sort
are your friends.
Also take a look at man perldoc.