in reply to Stupid, yet simple, sort question

Argh! You're using symbolic references aren't you. Please don't do that. It's nasty.

Here's how you do it using your system. Hopefully someone else will have more time and will be able to show you how you should do it using real references.

foreach my $loc (sort {${$b}{online} <=> ${$a}{online}} @locations) { print "${$loc}{online} ${$loc}{users} $loc\n"; }
--
<http://www.dave.org.uk>

"The first rule of Perl club is you don't talk about Perl club."