in reply to Formatting snmpget output and OIDs
In which case, I'd just do a split like so:
Does that help?my $snmp_return = "SNMPv2-SMI::enterprises.54321.1.2.1 = INTEGER: 2082 +447"; my (undef, $wanted) = split /=/, $snmp_return;
Update: Probably worth noting that the above approach would break if the data returned actually contained an equals sign, because $wanted would only contain everything between the first and second "=". However, you could overcome this by modifying the split to include a limit - like so:
my (undef, $wanted) = split /=/, $snmp_return, 2;
Cheers,
Darren :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Formatting snmpget output and OIDs
by just dave (Acolyte) on Apr 05, 2006 at 11:07 UTC | |
by McDarren (Abbot) on Apr 05, 2006 at 11:58 UTC | |
by jasonk (Parson) on Apr 05, 2006 at 13:06 UTC | |
by just dave (Acolyte) on Apr 09, 2006 at 07:03 UTC |