| Revision: | 1.1 |
| Committed: | Mon Jul 9 20:24:45 2007 UTC (18 years, 8 months ago) by elmex |
| Branch: | MAIN |
| CVS Tags: | HEAD |
| Log Message: | some changes... |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | elmex | 1.1 | #!/opt/perl/bin/perl |
| 2 | use Storable; | ||
| 3 | my $sd = retrieve 'room_data.stor'; | ||
| 4 | |||
| 5 | my %rooms; | ||
| 6 | for my $conf (keys %$sd) { | ||
| 7 | for my $room (keys %{$sd->{$conf}}) { | ||
| 8 | my $data = $sd->{$conf}->{$room}; | ||
| 9 | $rooms{$room} = $data; | ||
| 10 | } | ||
| 11 | } | ||
| 12 | |||
| 13 | my $total; | ||
| 14 | for my $r (sort { $a->[3] <=> $b->[3] } grep { $_->[3] != 0 } values %rooms) { | ||
| 15 | next unless $r->[3] >= 4; | ||
| 16 | $total += $r->[3]; | ||
| 17 | printf "%3d: %-50s | %s\n", $r->[3], $r->[1], $r->[2]; | ||
| 18 | } | ||
| 19 | print "total users: $total\n"; |