problem fetching www text file

From: <[email protected]>
Date: Wed, 23 Jun 1999 11:01:05 +0800 (MYT)

Hi,

I am trying to fetch a text file from www using Perl script. I am behind a
squid proxy. Will this script work? The script:

#!/usr/bin/perl
#!/usr/lib/perl5

die "Need two arguments, html, and file to transfer to!\n" if ( @ARGV !=
1);

use LWP::UserAgent;
my $ua = new LWP::UserAgent();

my $request = new HTTP::Request ('GET'
'http://www........./...txt');
my $result = $ua->request($request, "$ARGV[0]");

if($result->is_success())
 {
print 'DONE WITH TRANSFER'."\n";
 }

else
{
print 'TRANSFER FAIL'."\n";
}

Thanks in advance.
Received on Tue Jun 22 1999 - 20:50:04 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:46:57 MST