All pastes #614441 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-11 15:35 UTC
rendered paste body
use strict; 
use Socket; 
# initialize host and port 
my $host = shift || 'irc.swiftirc.net'; 
my $port = shift || 6667; 

my $proto = getprotobyname('tcp'); 

# get the port address 
my $iaddr = inet_aton($host); 
my $paddr = sockaddr_in($port, $iaddr); 
# create the socket, connect to the port 
socket(SOCKET, PF_INET, SOCK_STREAM, $proto) 
or die "socket: $!"; 
connect(SOCKET, $paddr) or die "connect: $!"; 
print $sock "Nick Fear|Perl";
print $sock "join #Fear;
print $sock privmsg #fear WOAH I CONNECTED;
my $line; 
while ($line = ) 
{ 
print $line; 
 } 
 close SOCKET or die "close: $!";