+5  A: 

POE has some pretty good event frameworks. I don't know how good the one for Jabber (POE::Component::Jabber) is, but it's probably worth looking at.

Andreas
+2  A: 

I think you can make your example work by doing this:

0 while $jabber->Process

Having said that, I would strongly recommend using a proper Event handling framework such as AnyEvent (my personal favorite) or POE (the traditional choice).

Leon Timmermans
that's what my loop uses now but it gets messed up if I get iq packets and message packets.
TheGNUGuy
+3  A: 

AnyEvent::XMPP is ridiculously comprehensive, and, since it uses AnyEvent, can be run in any event driven application with a supported loop (AnyEvent's own, Event, EV, Tk, Glib/Gtk, even POE).

MkV
I tried using AnyEvent but I ran into trouble during execution. I'll give it another shot, but do you know if it's available for ActivePerl? I ultimately want this to run on a *nix machine but right now I'm developing on windows 7 using eclipse and its perl plugin.
TheGNUGuy
I tried using the AnyEvent module again and when ever I try to send a message or set the presence of my bot, I get an error saying the object method "push_write" can't be found for AnyEvent::Util::guard and I can't figure out how to fix it. I think it might be because I'm using a 64-bit version of perl on CentOS 5.
TheGNUGuy