in reply to Fixed 'Top 10' compared with visitors' Top 10
then, to sort by chart position:$song{$chart_position}{TITLE} = 'Insomnia'; $song{$chart_position}{VISITOR_POS} = 10;
If you wanted to sort by the Visitor's position, play a few games with the sortfor $pos ( sort { $a <=> $b } keys %song ) { print "$pos $song{$pos}{VISITOR_POS} $song{$pos}{TITLE}\n"; }
and so on.for $pos ( sort { $song{$a}{VISITOR_POS} <=> $song{$b}{VISISTOR_POS} } + keys %song ) { print "$pos $song{$pos}{VISITOR_POS} $song{$pos}{TITLE}\n"; }
Mik
mikfire ( perlus bigotus maximus )
|
|---|