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.3. Socket level programming using IO::Socket

Example 8-2. examples/network/io_socket.pl

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

use IO::Socket;

# IO::Socket is a higher level abstraction
# Hides many of the ugly part we had to know in case of the socket() function.
# Provides an OOP interface.

#my $host = '127.0.0.1';
my $host = 'localhost';
#my $host = 'www.google.com';
#my $host = '209.85.135.103';
#my $host = 'www.perl.org.il';

my $port = 80;
my $CRLF = "\015\012";

my $socket = IO::Socket::INET->new(
            PeerAddr => $host,
            PeerPort => $port,
            Proto    => 'tcp',
        ) or die $!;

$socket->send("GET /$CRLF") or die $!;

my $SIZE = 100;
my $data = '';
while ($socket->read($data, $SIZE, length $data) == $SIZE) {};
print $data;

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