well.. TIMTOWTDI
I would store this as a nested array in a hash:
my %CLANS;
while(FILE){
chomp;
my($clan, @scores) = split /,/;
$CLANS{$clan} = \@scores;
}
# to sort in order
@clans_in_win_order = sort {
$CLANS{$b}[0] = $CLANS{$a}[0] ## sort by most wins first
Steveo wrote:
I understand how to sort $string1 and $string2 but I have something a
little more complicated (I think at least) and I've never done this
before. This is what my data looks like (flat ascii file)
(clan, wins, losses, points for, points against)
dod,4,3,700,400