#!/usr/bin/perl use strict; use WWW::Mechanize; use Crypt::SSLeay; my $mech = WWW::Mechanize->new(autocheck => 1,noproxy => 1); $mech->cookie_jar(HTTP::Cookies->new); $ENV{HTTPS_PROXY} = 'my_proxy:port/'; $mech->agent('Mozilla/5.0'); $mech->proxy(['https', 'http', 'ftp'], 'my_proxy:port'); # http $mech->get("http://www.google.com"); my $test = $mech->forms(); # https $mech->get("https://www.irctc.co.in") ; die $mech->response->status_line unless $mech->success; my $test = $mech->forms();