#!/usr/bin/env perl use warnings; use strict; use HTTP::Cookies; use WWW::Scripter; my $cookie_jar = HTTP::Cookies->new(); my $mech = WWW::Scripter->new( agent => 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0', cookie_jar => $cookie_jar, ); $mech->get("https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"); my $jquery = $mech->content; $mech->use_plugin( JavaScript => engine => 'SpiderMonkey', ); $mech->eval($jquery);