I have no way to access that. It seems like the LWP is not installed
on my host. Unless these will cause a 500 error.
#!/usr/bin/perl
LWP::UserAgent;
$ua = LWP::UserAgent->new;
$ua->proxy(['http', 'ftp'], '
http://www.domain.com/');
$req = new HTTP::Request('GET' => '
http://www.domain.com/temp.txt');
--
or
--
#!/usr/bin/perl
use LWP::Simple;
$doc = get '
http://www.domain.com/temp.txt';
Neither of these scripts is going to do what it seems like you want. A
'500 error', if I'm guessing correctly, is due to you not returning
proper headers from a CGI call.
First, try to make in run on your _local_ computer (ie, not as a CGI
script). For instance:
#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;
my $doc = get '
http://www.domain.com/temp.txt';
print $doc;
__END__
Then you can deal with making it a CGI:
#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;
use CGI;
my $doc = get '
http://www.domain.com/temp.txt';
my $q = new CGI;
print $q->header('text/plain');
print $doc;
__END__
(And yes, Ms. Gurl, I am aware that this is exceedingly inefficient. It
his, however, easy to understand, which it seems like the OP might need.)
Once you've done this, you can now sit down and determine how these
differ from your above examples.
As an exercise, figure out how to make the LWP::UserAgent version work.
HTH,
Ricky