|
#1
|
|||
|
|||
Re: a little perl help, please
[ QUOTE ]
In that case you can just use "foreach my $key ( sort keys %Players )" for simple sorting. [/ QUOTE ] That won't work on a 10 seat table. (I can't remember if Absolute is 9 handed or 10 handed tables.) That will produce a sorted list of 1,10,2,3,4,5,6,7,8,9. for (sort { $a <=> $b } keys %Players) would do what he was looking for though. |
#2
|
|||
|
|||
Re: a little perl help, please
[ QUOTE ]
[ QUOTE ] In that case you can just use "foreach my $key ( sort keys %Players )" for simple sorting. [/ QUOTE ] That won't work on a 10 seat table. (I can't remember if Absolute is 9 handed or 10 handed tables.) That will produce a sorted list of 1,10,2,3,4,5,6,7,8,9. for (sort { $a <=> $b } keys %Players) would do what he was looking for though. [/ QUOTE ] Oh, yeah, forgot about that wrinkle. The default sort is to sort them as strings. T |
|
|