#-- the "-varbindlist' array ref is assigned to $trios my $pairs = []; for (my $i = 0; $i < $#{$trios}; $i += 3) { if ($trios->[$i] !~ /^\.?\d+\.\d+(?:\.\d+)*/) { return $this->_error('Expected OBJECT IDENTIFIER in dotted notation'); } push(@{$pairs}, OBJECT_IDENTIFIER, $trios->[$i], $trios->[$i+1], $trios->[$i+2] ); }