use strict; use warnings; use WWW::Mechanize::PhantomJS; my $js = WWW::Mechanize::PhantomJS->new(launch_exe=> 'C:/prog/phantomjs/bin/phantomjs.exe'); $js->get_local("hello.js"); #$js->update_html(''); #print $js->content; #my ($val, $type) = $js->eval_in_page('JSON.stringify(window.leg);'); my ($val, $type) = $js->eval_in_page('to_json()'); print "val: $val, type: $type\n";