#!/usr/bin/perl use IO::Socket; $s = IO::Socket::INET->new(Proto=>'tcp',PeerAddr=> 'irc.cyberarmy.com',PeerPort=> 6667); print $s "NICK b0t\nUSER b0t - - :b0t\n"; while($s) { my ($i,$j)= split/ /, $_ = <$s>; print; if ($_ eq 'PING') { print $s 'PONG '.$j;} }