%myHash = (first => 1, second => 2, third => 3); #declare & init'lize
for $key (sort keys %myHash) { #set the keys into $key in turn
    # note the ( ) ensures that we operate on the sorted keys
    print "$key: $myHash{$key}\n"; #print each key and its value
}
