Also, watch those 'bad habits' yourself...
You forgot
#!/usr/bin/perl
use warnings;
use strict;
Don't wanna get into bad habits now ;)
use IO::Socket;
use warnings;
use strict;
$sock = IO::Socket::INET->new(
PeerAddr => 'server_here',
PeerPort => 6667,
Proto => 'tcp' ) or die "could not make the connection";
You forgot to actuall `use' strict.
Not to mention... youre re-inventing the wheel. look into PoCo::IRC