giany has asked for the wisdom of the Perl Monks concerning the following question:
The problem is that when I run it it shows smth like this:my $vresult = $session->get_table(-baseoid => $hardware_info); my %hashes = %{$vresult}; foreach my $key (keys %hashes){ print ($key," : ",$hashes{$key},"\n"); }
I want those to be sorted smth like foreach my $key (sort keys %hashes){ but then it will show me :.1.3.6.1.4.1.26543.2.5.1.3.1.19.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.20.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.2.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.13.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.16.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.21.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.22.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.1.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.12.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.23.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.17.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.18.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.14.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.24.0 : .1.3.6.1.4.1.26543.2.5.1.3.1.15.0 :
How can I do to show me smth like this:.1.3.6.1.4.1.26543.2.5.1.3.1.1.0 .1.3.6.1.4.1.26543.2.5.1.3.1.12.0 .1.3.6.1.4.1.26543.2.5.1.3.1.13.0 .1.3.6.1.4.1.26543.2.5.1.3.1.14.0 .... .1.3.6.1.4.1.26543.2.5.1.3.1.2.0 .1.3.6.1.4.1.26543.2.5.1.3.1.20.0 .1.3.6.1.4.1.26543.2.5.1.3.1.21.0
Hope you understand what I say..thanks..1.3.6.1.4.1.26543.2.5.1.3.1.1.0 .1.3.6.1.4.1.26543.2.5.1.3.1.2.0 .1.3.6.1.4.1.26543.2.5.1.3.1.12.0 .1.3.6.1.4.1.26543.2.5.1.3.1.13.0 .. .1.3.6.1.4.1.26543.2.5.1.3.1.19.0 .1.3.6.1.4.1.26543.2.5.1.3.1.20.0 .1.3.6.1.4.1.26543.2.5.1.3.1.21.0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SNMP question
by Corion (Patriarch) on Oct 23, 2008 at 13:29 UTC | |
by giany (Acolyte) on Oct 24, 2008 at 08:46 UTC | |
|
Re: Net::SNMP question
by Anonymous Monk on Oct 23, 2008 at 13:32 UTC |