in reply to Re^3: Net::SNMP ASN1 Type error
in thread Net::SNMP ASN1 Type error
Ok, I have changed the code to this:
use strict; use warnings; use Net::SNMP; my $ip = XXX.XXX.XXX.XXX; my $SESSION = Net::SNMP->session (-hostname=>$ip, -community=>"private +"); $SESSION->set_request(-varbindlist=> ['1.3.6.1.4.1.6080.3.1.2.4.0", IN +TEGER, 1]); print $SESSION->error();
When I run that I get the following error: Bareword "INTEGER" not allowed while "strict subs" in use at line 19. If I put quotes around INTEGER, I get the original error of ASN.1 Type Integer unknown.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Net::SNMP ASN1 Type error
by kcott (Archbishop) on Oct 11, 2010 at 20:30 UTC | |
|
Re^5: Net::SNMP ASN1 Type error
by kcott (Archbishop) on Oct 12, 2010 at 10:56 UTC | |
by jbumsted (Initiate) on Oct 12, 2010 at 13:59 UTC | |
by VinsWorldcom (Prior) on Oct 12, 2010 at 16:43 UTC | |
by kcott (Archbishop) on Oct 12, 2010 at 20:49 UTC | |
by jbumsted (Initiate) on Oct 13, 2010 at 13:24 UTC | |
by Anonymous Monk on Oct 29, 2013 at 14:47 UTC | |
by Anonymous Monk on Jul 23, 2015 at 20:06 UTC |