in reply to Extract data using snmpget with hash array

Try something like this:
use Data::Dumper; for my $host ( @ARGV ) { if ( $result->{$host} ) { print "Got host $host:\n", Dumper( $result->{$host} ); } else { print "Did not get host $host:\n", Dumper( $err->{$host} ); } }
You should then be able to work out how to extract needed info.

Replies are listed 'Best First'.
Re^2: Extract data using snmpget with hash array
by ivancheng (Initiate) on Sep 04, 2015 at 11:16 UTC
    How can I extract the needed information? Please kindly advice. Thanks in advance. Regards, Ivan