- or download this
sub setManagers() {
my $getInputFlag = 1;
my $writeFileFlag = 1;
my $mCounter = 0;
- or download this
my $ans = &promptUser("Do you wish to configure SNMP Managers
+on $var? ", "yes");
- or download this
if ($ans =~ /^[n]o?/i) {
- or download this
if ($address =~ /^(([3-9]\d?|[01]\d{0,2}|2\d?|2[0-4]\d|25[0-
+5])\.){3}([3-9]\d?|[01]\d{0,2}|2\d?|2[0-4]\d|25[0-5])$/)
- or download this
(?:[3-9]\d?|[01]\d{0,2}|2\d?|2[0-4]\d|25[0-5])
- or download this
$managers[$mCounter]{address} = $address;
$managers[$mCounter]{port} = $port;
$managers[$mCounter]{version} = $version;
$managers[$mCounter]{community} = $community;
- or download this
@{ $managers[$mCounter] }[qw/address port version community]=
($address $port $version $community);
- or download this
my $numOfManagers = scalar(@managers);
print FILE "manager.total=$numOfManagers\n";
for (my $i=0; $i<$numOfManagers; $i++) {
- or download this
for my $i (0..$#managers) { ... }
- or download this
for my $item (@managers) { ... }