- or download this
#!/usr/bin/perl
...
}
closedir(THISDIR);
}
- or download this
$mib = 'someMibObject';
$vb = SNMP::Varbind->new([$mib]);
...
if ( $sess->{ErrorNum} ) {
# We might do something more interesting than print here.
}
- or download this
# Here are the ideas. Remember that $mac = 'addr' is
# supposed to be part of the 'given'. My apologies if I
...
#
# Change '00:01:02:04:08:0A' to '0.1.2.4.8.10':
$mac = '00:01:02:04:08:0A';
- or download this
$mac =~ s/(..)(:)?/hex($1).($2?'.':'')/ge;
- or download this
$mac =~ s/([0-9A-F]+|:)/$1 eq ':' ? '.' : hex($1)/ge;
- or download this
$mac = join '.', map hex($_), split(/:/, $mac);
- or download this
Rate Shenme PodMaster My Way
Shenme 38212/s -- -31% -50%
PodMaster 55710/s 46% -- -28%
My Way 76982/s 101% 38% --
- or download this
# Convert any known MAC format to any other known format.
sub ConvertMac($$$) {
...
# anything else down here, we won't circumvent it by escaping earl
+y.
return($mac);
}