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.

8.5. Net::Telnet

Example 8-3. examples/telnet/telnet.pl

#!/usr/bin/perl
use strict;
use warnings;

use Net::Telnet ();
my $t = Net::Telnet->new();
 
$t->open('localhost');
$t->login('smoke', '123456');
my @lines = $t->cmd("who");
print @lines;
print "\n";

print "Who am i: ", $t->cmd("whoami"), "\n\n";

If you are interested in on-site trainings by the author, please contact me directly.