in reply to Sorting a list by frequency of items

Two quick suggestions. First, instead of sorting the list of keys and then reversing it, sort in the proper order to begin with. Second, foreach (LIST) { push ARRAY, $_ } can be rewritten as push ARRAY LIST.
foreach my $host (sort { $frequency{$b} <=> $frequency{$a} } keys %fre +quency) { push @recipients, @$host; }