RE: sorting data (more than one scalar involved)

2002-09-26 Thread Nikola Janceski
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

Re: sorting data (more than one scalar involved)

2002-09-26 Thread John W. Krahn
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