#!/usr/bin/perl -w

use strict;

my %hash = ( "Fred" => 5, "Bob" => 3 );

# Iterate over hash entries.
my @keys = sort(keys(%hash));
my $key;

foreach $key (@keys)
{
    print $key.':'.$hash{$key}."\n";
}
