#!/proj/DVT/bin/perl -w use strict; use Net::AIM; unless (@ARGV == 4) { print "usage: aim_fire \n"; } my ($from, $passwd, $to, $msg) = @ARGV; my $AIM = new Net::AIM; my $rv = $AIM->newconn(Screenname => $from, Password => $passwd) or die "Unable to open AIM connection.\n"; my $ready = 0; $AIM->getconn->set_handler(config => sub {$ready = 1}); do { $AIM->do_one_loop; } until $ready; $AIM->send_im($to, $msg);