#!/usr/local/perls/perl-5.20.0/bin/perl use v5.10; use strict; use warnings; use diagnostics; use WWW::Mechanize::Firefox; use HTTP::Cookies; my $FEXdms = 'http://www.financeexpress.com/'; my $web_page = 'current'; my $mech = WWW::Mechanize::Firefox->new( tab => $web_page, activate => 1, # bring the tab to the foreground autoclose => 0 # to prevent autoclosing of the Tab ); $mech->get( $FEXdms ); $mech->click_button( name=> "btnLogin" );