Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$games{person) = "11::Game name::Game date"; I have it setup like that. How can I print the records in order from highest to lowest (first split before :: in the value) and have everything else from that particular heash entry kept together? Ie. I want to print out all scores like:
foreach (sort keys %games) { my ($count, $game, $date) = split(/::/, $games{$_}); print "<td>$_</td> <td>SPLIT BY NUMBER HERE</td>..."; }
Thank you, wise monks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorting on a split hash value
by Roger (Parson) on Jan 15, 2004 at 12:59 UTC | |
by thor (Priest) on Jan 15, 2004 at 13:12 UTC | |
|
Re: Sorting on a split hash value
by flounder99 (Friar) on Jan 15, 2004 at 13:40 UTC | |
|
Re: Sorting on a split hash value
by Hofmator (Curate) on Jan 15, 2004 at 13:14 UTC | |
|
Re: Sorting on a split hash value
by thor (Priest) on Jan 15, 2004 at 13:22 UTC | |
|
Re: Sorting on a split hash value
by hmerrill (Friar) on Jan 15, 2004 at 14:27 UTC | |
|
Re: Sorting on a split hash value
by Mr. Muskrat (Canon) on Jan 17, 2004 at 02:55 UTC |