Why not just use, and extend, existing bots written in perl
or write your own using a framework like Net::IRC ?
I use Net::IRC to power a bot I wrote. Its a verry nice event driven framework for connecting to IRC and handles all of the IRC commands for you.
I know some pepole that really like perlbot:
http://perlbot.sourceforge.net
Tho I haven't used it it looks to be a very nice project..