Net-Telnet
view release on metacpan or search on metacpan
lib/Net/Telnet.pm view on Meta::CPAN
('if (($pos = index $s->{buf}, ', ') > -1) {
$len = ', ';
$prematch = substr $s->{buf}, 0, $pos;
$match = substr $s->{buf}, $pos, $len;
substr($s->{buf}, 0, $pos + $len) = "";
last;
}');
## Code template used to build pattern match conditional.
## Values between array elements must be supplied later.
if ($] ge '5.006') { # perl5.6.0+ has performance alternative to $` and $&
@match_cond =
('if ($s->{buf} =~ ', ') {
$prematch = substr($s->{buf}, 0, $-[0]);
$match = substr($s->{buf}, $-[0], $+[0] - $-[0]);
substr($s->{buf}, 0, length($prematch) + length($match)) = "";
last;
}');
}
else {
@match_cond =
( run in 2.438 seconds using v1.01-cache-2.11-cpan-800906f7e73 )