Client.pl
#!/usr/bin/perl
# Client.pl
# This is the client (perl)
# app. It opens a connection
# to a server, and sends it
# a message.
# - Jim
# Use the library that lets us
# connect to a web server.
use IO::Socket;
# Create the pipe to the server.
# At this point, it checks to see if it can connect
# to the server, on the port, with the protocol.
my $Socket = IO::Socket::INET->new(PeerAddr => "localhost",
PeerPort => 4321,
Proto => "udp");
# Send some info to the server.
$Socket->send("Hello!");