use Net::AIM; $screenname = ''; # the screenname to connect with $password = ''; # the password to connect with $ownersn = ''; # the screenname to have your bot notify $SIG{PWR} = \&PWR_handler; sub PWR_handler { $aim = new Net::AIM; $aim->newconn(Screenname => $screenname, Password => $password) or die 'Can\'t connect to AIM server.\n'; $conn = $aim->getconn(); $aim->start; $conn->send_im($ownersn, 'My power supply is failing. Please come and save me!'); exit; }