in reply to Re: AOL Messaging
in thread readline() on unopened filehandle (was: AOL Messaging)

Ok, thanks. That removed on error and a new error just occured. I get an uninitialized error at @@@@, do you know why? If I remove the my I get the error saying I need to use one under strict but when I get it I get this error.

Thanks!
#!/usr/bin/perl use strict; use warnings; # require Net::AOLIM; my $user = "wfgs343R"; my $pass = "iamcool"; my $Version; 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' => "AOLIM:$Version VERSION\$"); $aim->signon; $aim->toc_send_im($destuser, $message);

Replies are listed 'Best First'.
Re: Re: Re: AOL Messaging
by pg (Canon) on Apr 09, 2003 at 06:04 UTC
    To set aim_agent, you used $Version, which is a variable you my'd earlier, and it is unitialized.

    So you should initialize it, if you want to use it.

    What they actually suggest you to use is $Net::AOLIM::VERSION, which is the version of your AOLIM package. To use this one, you neither need to declare it, nor to initialize it. Those are done for you in the AOLIM package, so you just use it, it is ready for you.
      Thanks for your help, pg. Now I have no errors present on runtime (so it says). The messages I'm trying to send aren't working, but atleast I've got a start on it now.

      Maybe I should have worked with perl a while longer before trying to tackle something like this :S.

      Thanks again.