#!/usr/bin/perl IRC::print "\0035:: Loading X-Chat Perlmonks XML Ticker ::\003 \n"; IRC::register ("PM XML Ticker", "0.1", "", ""); IRC::add_timeout_handler(300000, getXP); #Add a timeout handler that checks every 5 mins IRC::add_timeout_handler(300000, getInbox); #again :) but diff sub handler sub getXP { open(XP,"; close(XP); chomp $xp; IRC::print $xp,"\n"; IRC::add_timeout_handler(300000, getXP); } sub getInbox { open(INBOX,"; close(INBOX); if (@Inbox) { IRC::print @Inbox; } IRC::add_timeout_handler(300000, getInbox); }