in reply to (Is there ) Perl equivalent to setinternet2(true) in R ?

Is this proxy filtering based on user agent or on program, or do you just need to configure the software to use the proxy?

There's the agent() method for LWP::UserAgent. It doesn't wrap a specific Windows DLL but it does allow you to set your UserAgent string to whatever you want.

If you just need to configure your user agent to use the proxy, there are proxy attributes for LWP::UserAgent, too.

There's WWW::Selenium which is designed to test things using the Selenium suite (see also Alien::Selenium). That uses Firefox or IE to connect and retrieve pages. A quick search of CPAN also shows a few modules I've never used that may help by actually using Internet Explorer to access things.:

See also WWW::Mechanize

  • Comment on Re: (Is there ) Perl equivalent to setinternet2(true) in R ?

Replies are listed 'Best First'.
Re^2: (Is there ) Perl equivalent to setinternet2(true) in R ?
by Anonymous Monk on Sep 04, 2014 at 15:42 UTC

    Thank you very much! It seems that one need to configure software to use the proxy.

    I tried the following:

    use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->env_proxy; my $req = HTTP::Request->new(GET => 'http://www.perlmonks.org'); print $ua->request($req)->as_string;

    This made no connection @work (I am @home now, sorry, cannot reproduce the exact error message). The attempt with $ua->proxy($scheme, $proxy_url) "did not work" either - again, cannot reproduce the exact error message till tomorrow but it did not ask to type in a password or something.

    I'll definitely give Win32::IEAutomation a try.

    WWW::Selenium requires that Selenium Server is installed - not an option here ...