in reply to Help with LWP GET request
The extra parameters to LWP::UserAgent::get do not add URL parameters but HTTP header values -- it's not what you want. You need to construct the URL for a GET:
my $res = $ua->get( "http://www.airport-data.com/search/intl-airports. +php?field=code&kw=$arg" );
Update: As ikegami pointed out, this is not a complete solution. You do need to guard against bad input ... hmmm ... I'm going to start putting a standard disclaimer on my posts that all solutions are not complete and are only for illustrative purposes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help with LWP GET request
by ikegami (Patriarch) on Jun 11, 2008 at 12:52 UTC |