use Net::AIM; my $nick = 'xx'; $aim = new Net::AIM; $aim->newconn( Screename => 'xx', Password => 'xx' ) or die "Cannot connect to AIM Server!"; $aim->getconn->add_handler('config', \&init); $aim->start; sub init { my ($self, $event) = @_; my ($str) = $event->args; $self->setconfig($str); $self->send_im($nick, "Are you there, good sir?"); }