in reply to Text Manipulation Quickie

Try this:
#!/usr/bin/perl -w use strict; my %value; for (<DATA>){ chomp; $value{$_}++ if $_; } my $max = (sort map { $value{$_} } keys %value)[-1]; for my $count (1..$max){ for (sort keys %value){ print "$_\n" if $value{$_} >= $count; } } __DATA__ 2 2 2 3 3 3 4 4 4
Update:
For an uneven list as those Frankus mentions, this will work according to his first example, ie:
2
2
2
3
3
3
4
4
5
Will return:

2
3
4
5
2
3
4
2
3
You can make it work like his second example by reversing the loop:
for my $count (reverse 1..$max){

Update (2): Got rid of pesky newlines per katgirl.

-- grummerX