|
You are looking at a very old, but free version of the course. If you are interesed the most recent version, check it out on the Perl Maven site. 10.2. Connect to the deviceSetting both Dump_log and Input_log in the constructor of Net::Telnet Example 10-1. examples/cli/cli_01.pl #!/usr/bin/perl
use strict;
use warnings;
use Net::Telnet;
my $port = 8000;
my $hostname = 'localhost';
my $telnet = Net::Telnet->new(
Port => $port,
Host => $hostname,
Dump_log => 'dump.log',
Input_log => 'input.log',
);
print "opened\n";
{
my ($prematch, $match) = $telnet->waitfor('/not likely to show up/');
}
print "after wait\n";
Running the script we notice that after printing "opened" it waits
|