Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; print "Content-type: text/html\n\n"; use LWP::UserAgent; use lib "/pathtomodules"; my $ua = new LWP::UserAgent; $ENV{QUERY_STRING} =~ s/%([\da-fA-F][\dA-Fa-f])/pack("C", hex($1))/eg; my $url = $ENV{QUERY_STRING}; my $request = new HTTP::Request $ENV{REQUEST_METHOD} => "$url"; my $response = $ua->request($request); my $content; if ($response->is_success) { $content = $response->content; print $content; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with LWP
by Fastolfe (Vicar) on Jan 15, 2001 at 08:44 UTC | |
|
Re: Help with LWP
by extremely (Priest) on Jan 15, 2001 at 08:56 UTC | |
|
Re: Help with LWP
by dkubb (Deacon) on Jan 15, 2001 at 11:13 UTC |