use WWW::Mechanize::PhantomJS; my $mech = WWW::Mechanize::PhantomJS->new(); $mech->get('http://google.com'); # give it some time... $mech->eval_in_page('console.log(JSON.stringify(opportunity));');