alvise has asked for the wisdom of the Perl Monks concerning the following question:

Hi. Last year I wrote a script that uses LWP.

Now the system manager in my company moved from redhat 6.2 to redhat 7.2 (and perl 5.6), and the following statement:

my $response = $ua -> request ( $request ); #(ua=user agent)

receives the following error:

Use of uninitialized value in hash element at /usr/lib/perl5/site_perl/5.6.0/WWW/RobotRules.pm line 260 (#1)

I printed $request just before the error is given, and it equals to:

HTTP::Request=HASH(0x834d738)

Can anybody try to enlight me about what happened ?

Thanks from Alvise.

Replies are listed 'Best First'.
Re: LWP user agent request fails
by io (Scribe) on Feb 27, 2002 at 10:51 UTC
    check the value on $ua too. Make sure it is defined. Are those spaces around the -> in $response = $ua -> request ( $request );? Maybe removing them will help. Not sure