I remember a long time ago, I have a Perl script that was an automatic aol instant messenger bot. It would give responses you said. It was a pretty cool script and easy to edit, I managed to get it to respond to a few things, but I don't know what happend to the script. I will keep my eyes open and post a link to it if I find it.
EDIT: this is not what I was speaking of, but this might be of use if your interted:
http://perl.about.com/od/packagesmod...perlaimbot.htm. It seems quite easier since its using preset aim commands, doesnt require much programming.