#!/usr/local/bin/perl -w

require LWP::Debug;
require LWP::Protocol::http;
require LWP::UserAgent;

#LWP::Debug::level('+');

my $ua = new LWP::UserAgent;    # create a useragent to test

$ua->env_proxy;

foreach $u (@ARGV)
 {
  my $url = new URI::URL($u);
  my $request = new HTTP::Request('GET', $url);
  my $response = $ua->request($request, undef, undef);
  if ($response->is_success)
   {
    print $response->content;
   }
  else
   {
    print STDERR $response->as_string;
   }
 }



