mlapaglia has asked for the wisdom of the Perl Monks concerning the following question:
my $sock = new IO::Socket::SSL(PeerAddr => 'myircserver', PeerPort => +'6697', Proto => 'tcp') or die "Can't connect\n"; print $sock "NICK mlapaglia\r\n"; print $sock "USER mlapaglia\r\n"; while(my $input = <$sock>) { if($input =~ /004/) { last; } elsif($input =~ /433/) { die "nickname already in use\n"; } } print $sock "JOIN #testing123\r\n"; while(my $input = <$sock>) { chop $input; if($input =~ /^PING(.*)$/i) { print $sock "PONG $1\r\n"; } elsif($input =~ /^:(.*)!(.*)\@(.*?) PRIVMSG (.*)/i) { event_privmsg("myserver", $4, $1, $3); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Simple IRC Client question
by Corion (Patriarch) on Feb 18, 2010 at 20:03 UTC | |
by mlapaglia (Initiate) on Feb 19, 2010 at 01:01 UTC | |
by Corion (Patriarch) on Feb 19, 2010 at 07:55 UTC | |
by Anonymous Monk on Feb 19, 2010 at 17:06 UTC | |
by mlapaglia (Initiate) on Feb 19, 2010 at 17:12 UTC | |
| |
by Your Mother (Archbishop) on Feb 19, 2010 at 01:19 UTC | |
|
Re: Perl Simple IRC Client question
by rowdog (Curate) on Feb 19, 2010 at 06:27 UTC |