There are a few things about this code:#!/usr/bin/perl -w use strict; use CGI; use HTTP::Request::Common qw(GET POST); use LWP::UserAgent; my $cgi = CGI->new; my $ua = LWP::UserAgent->new; my $response = $ua->request( $cgi->request_method eq 'POST' ? POST $cgi->param('url'), [ $cgi->Vars ] : GET $cgi->param('url') . '?' . $cgi->query_string, ); print $cgi->header, $response->is_success ? $response->content : $response->error_as_HTML;
http://sitename.com/path/to/file.html
In reply to Re: Help with LWP
by dkubb
in thread Help with LWP
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |