
FishMonger
Veteran
/ Moderator
May 18, 2009, 11:51 AM
Post #2 of 5
(4530 views)
|
I'm unable to duplicate your issue.
[root@fc4dev ~]# cat test.pl #!/usr/bin/perl use strict; use warnings; my %resolved = ('device.netserv.ch' => 1, 'isp.belgacom.be' => 11, ); $| = 1; my $total = 0; for (sort { $resolved{$b} <=> $resolved{$a} } keys(%resolved)) { $total += $resolved{$_}; printf "%5d \t%s\n", $resolved{$_}, $_; } printf "-----\n%5d\n", $total; [root@fc4dev ~]# ./test.pl 11 isp.belgacom.be 1 device.netserv.ch ----- 12 [root@fc4dev ~]# ./test.pl 11 isp.belgacom.be 1 device.netserv.ch ----- 12 [root@fc4dev ~]# ./test.pl 11 isp.belgacom.be 1 device.netserv.ch ----- 12 [root@fc4dev ~]# ./test.pl 11 isp.belgacom.be 1 device.netserv.ch ----- 12 [root@fc4dev ~]# ./test.pl 11 isp.belgacom.be 1 device.netserv.ch ----- 12 [root@fc4dev ~]# ./test.pl 11 isp.belgacom.be 1 device.netserv.ch ----- 12 [root@fc4dev ~]# ./test.pl 11 isp.belgacom.be 1 device.netserv.ch ----- 12 Can you post a complete example, as I did, of the issue?
|