Not IRC, but an example fo how to use sockets in perl..
Code:
#!/usr/bin/perl
use IO::Socket;
$data = "GET / HTTP/1.0\r\n\r\n";
my $sock = new IO::Socket::INET (
PeerAddr => 'www.planetarion.com',
PeerPort => '80',
Proto => 'tcp',
);
die "Could not create socket: $!\n" unless $sock;
print $sock "$data";
while (<$sock>) {
print;
}
close($sock);