c has asked for the wisdom of the Perl Monks concerning the following question:
My code, is pretty basic
#!/usr/bin/perl -w ## module calls use strict; use Net::SNMP; ## start snmp session my $s = Net::SNMP->session( -hostname => "10.6.21.10", -community => "private" ); ## run the get my $ios_version = $s->get_request(".1.3.6.1.2.1.1.1.0"); my $error = $s->error; ## close the snmp session $s->close; ## print results print "$error\n$ios_version\n\n";
however the output of $ios_version ends up being
HASH(0x811fb50)
i am sure that i have seen this error before, and i had thought it had something to do with trying to represent a hash value as a scalar or vice versa. however, making $ios_version into @ios_version still provides the same output. can someone beat this into my head one more time so it stays?
humbly -c
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash value being called as a Scalar?
by stefp (Vicar) on Oct 08, 2001 at 21:07 UTC | |
|
Re: Hash value being called as a Scalar?
by tune (Curate) on Oct 08, 2001 at 20:59 UTC | |
|
Re: Hash value being called as a Scalar?
by mr_dont (Beadle) on Oct 08, 2001 at 21:04 UTC | |
|
Re: Hash value being called as a Scalar?
by Rex(Wrecks) (Curate) on Oct 08, 2001 at 23:55 UTC | |
|
Re: Hash value being called as a Scalar?
by converter (Priest) on Oct 09, 2001 at 06:18 UTC |