
Zeke_D
Deleted
Aug 13, 2000, 9:45 AM
Post #1 of 1
(401 views)
|
|
sorting variables
|
Can't Post
|
|
I am trying to make a 'best guessers' script here is the routine i have so far: open ("USERNAMES", "users.list"); @username = <USERNAMES>; foreach (@username) { ($user) = split ('[|]',$_); open ("FILE","/data/$user.reg")| |print "cant read userfile"; @file = <FILE>; foreach (@file) { ( $name, $xguess, $xright, $xscore) = split ('[|]',$_); } close (FILE); } close (USERNAMES); First I would like to sort by $xright (the variable that indicates how many correct guesses the user has if there is a tie then sort those by $xscore (the score for the correct answers) finally if there is still a tie I want to sort by $xguess (number of guesses it took to get the score) on $xguess the lower number is better. BTW, thanks for all the help ive needed the last month, everyone has been super-helpful.
|