Print the SNMP varops

This section of the SNMP GET access example Perl script sets up the logic to print the SNMP varops. Use this part of the example script as a guide to writing code that prints the SNMP varops in client/server Perl scripts that retrieve SNMP information.

The SNMP GET access example Perl script sets up the logic to print SNMP varops as follows:


 sub PrintVarOp { 1
 	my ($vp) = @_;

	my $asn1 = $vp->{ASN1};
 		my $value = $vp->{VALUE};
 		my ($oid, $index, $name) = $snmp-> SplitOidAndIndex ($asn1);
 		print "$Ttype: $name.$index = $value\n";
 }

The following list explains specific numbered items in the previously listed section of the SNMP GET access Perl script example:

  1. Prints the SNMP varops.