Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-17-2005, 01:33 PM
zram21 zram21 is offline
Junior Member
 
Join Date: Dec 2003
Posts: 0
Default 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.
Reply With Quote
  #2  
Old 10-17-2005, 02:18 PM
SheridanCat SheridanCat is offline
Member
 
Join Date: Sep 2002
Location: Chicago
Posts: 86
Default 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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:47 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.