#!/usr/bin/perl use warnings; use strict; my %accounts = ( tom => "BigApple", tom2 => "BigApple2", tom3 => "BigApple3", tom4 => "BigApple4", tom5 => "BigApple5", tom6 => "BigApple6", tom7 => "BigApple7", ); my @keys = reverse sort keys %accounts; print join ("\t", @$_), "\n" while @$_ = splice @keys, 0, 3;