in reply to Looping through HTTP headers

If you use LWP::Simple, then you don't need to use $ua->env_proxy. It does it automatically. Also, I would use LWP::Simple for simple uses such as url validation. For example, here I have a bunch of urls that I want to check for validity:
#!/usr/bin/perl use strict; use warnings; use LWP::Simple; my @pages = ( 'http://www.perlmonks.org', 'http://www.perlmonks.com', 'http://www.perlmonks.net', 'http://www.perlmonks.edu', 'http://www.perlmonks.co.uk', 'http://perlmonks.perl.org' ); foreach my $page(@pages) { if (head($page)) { print "Exists\n"; } else { print "It doesn't exist\n"; } }

Replies are listed 'Best First'.
Re^2: Looping through HTTP headers
by Anonymous Monk on Sep 27, 2010 at 19:13 UTC
    Thanks for those additional comments too.