You are missing () after $aim->signon I dont know if this makes a difference honestly.
You should check the return value of signon, when I ran your code, (with my aim of course) the return value of signon was undef (which the docs say means it failed). According to the documentation there are some error messages you can get back (IM_ERR). Try printing those out.
in reply to Re: Re: Hanging program
in thread Hanging program
Also, it takes about thirty or forty seconds for the signon to fail, are you waiting long enough?