Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Hanging program

by Anonymous Monk
on Apr 11, 2003 at 03:05 UTC ( #249793=note: print w/replies, xml ) Need Help??


in reply to Re: Hanging program
in thread Hanging program

Program dies after "Information is being passed.". Does this help?
#!/usr/bin/perl use strict; use warnings; my $user = "wfgs343R"; my $pass = "iamcool"; my $aim; print "Subject's Name:"; chomp(my $destuser = <STDIN>); print "Message:"; chomp(my $message = <STDIN>); use Net::AOLIM; $aim = Net::AOLIM->new( 'username' => $user, 'password' => $pass, 'callback' => \&callbackfunction, 'server' => 'toc.oscar.aol.com', 'port' => 1234, 'allow_srv_settings' => 1, 'login_server' => 'login.oscar.aol.com', 'login_port' => 5198, 'login_timeout' => 0, 'aim_agent' => "$Net::AOLIM::VERSION"); print "Information is being passed.\n"; $aim->signon; print "Aim is signed on.\n"; $aim->toc_send_im($destuser, $message); print "Done\n";

Replies are listed 'Best First'.
Re: Re: Re: Hanging program
by krujos (Curate) on Apr 11, 2003 at 03:22 UTC
    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.
    Also, it takes about thirty or forty seconds for the signon to fail, are you waiting long enough?
    Good luck,
    Josh

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://249793]
help
Chatterbox?
[marioroy]: Back in HighSchool, I came late to Gym class. There was a fellow who was picked last, no team wanted him for racketball. So it was us two against everybody. I looked at him in the eye and said to let your body loose and let the powers to be help us win.
[marioroy]: We made it all the way to the end. The expience was magical. I not good at sports. Someone or thing was there.
erix considers extracting a catalog ...
[karlgoethebier]: marioroy: Racket ball is considered harmful, like Squash
[marioroy]: Wait till folks see what MCE::Hobo can do in the upcoming release. Multiple instances, nested spawning, 3 levels, doesn't matter. it works on Windiows too.
[Lady_Aleena]: I hate sites that tell me to turn ad-blocker off. They should know better.
[marioroy]: s/Windiows/ Windows/
[Discipulus]: marioroy can you expand that Niagara's fall history?
erix only sees fallen angels
erix if it weren't for bad luck, I'd have no luck at all

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2017-05-29 08:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?