Hi all,

I have a big problem with a script that uses the LWP module.

The script works under Windows with Perl 5.6.1 but it doesn't work under
Linux with Perl 5.6.0.

I've tried to print the code from a response from server and it gives me the
code 501 and not 200 as it should.

The content of the page is not gotten also.

What could be the problem?

I've made another directory where I've put the LWP.pm, the LWP directory and
the HTTP directory with modules.

What else do I need to install to make the script work?

Here is the script:

#!/usr/bin/perl

use strict;
use lib "/var/www/teddy/lib";
use LWP::UserAgent;

my $page = "http://192.168.0.2/";;

my $ua = LWP::UserAgent -> new;

my $response = $ua -> get($page);
print $response -> code();


Thank you very very much. I am fighting with this script for more days but
with no success.

Teddy's Center: http://teddy.fcc.ro/
Mail: [EMAIL PROTECTED]


Reply via email to