Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Re: Re: Getting more out of LWP::Simple

by jasonk (Parson)
on Mar 23, 2003 at 21:18 UTC ( #245313=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Getting more out of LWP::Simple
in thread Getting more out of LWP::Simple

Because you never defined $ua, so the proxy call doesn't do anything. LWP::Simple doesn't provide an interface to set the proxies in this manner, you need to do it by setting the $http_proxy environment variable instead...

#!/usr/bin/perl -w use strict; use LWP::Simple $env{http_proxy} = "http://myproxy:myport"; my $content = get("http://news.bbc.co.uk"); if($content) { print $content; } else { print "Error: Get stuffed"; }

We're not surrounded, we're in a target-rich environment!


Comment on Re: Re: Re: Re: Getting more out of LWP::Simple
Download Code
Re^5: Getting more out of LWP::Simple
by Aristotle (Chancellor) on Mar 23, 2003 at 23:02 UTC
    Yes it does - it's right there in the root node of this thread, and of course the fine manual.

    Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://245313]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2015-07-02 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (31 votes), past polls