gmclean has asked for the wisdom of the Perl Monks concerning the following question:
Thanks, George#!/usr/bin/perl # Create a user agent object use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $url = 'http://www.nwweather.com/images/realwind-animate1.gif'; my $response = $ua->get($url, ':content_file' => 'testimage.gif'); # Pass request to the user agent and get a response back # Check the outcome of the response if ($response->is_success) { print $url; } else { print $response->status_line, "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: linux file creation
by bobf (Monsignor) on May 31, 2007 at 05:56 UTC | |
by Anonymous Monk on Jun 01, 2007 at 05:17 UTC | |
|
Re: linux file creation
by quester (Vicar) on May 31, 2007 at 05:59 UTC |