1. Put sorted keys into @keys 2. Loop over the first five elements of @keys (many ways to achieve this) 3. Print those five records in the loop: print $hash{$key}