in reply to How to use javascript code in Perl?
i had deal with JavaScript.pm from CPAN that is based on the separate non-interactive js-interpreter library from Gecko. It can evaluate JS functions but lacks of the DOM infrastructure.
The stuff it made was to grab out info ( the numbers ) obfuscated with arithmetic operations in JS from automatic crawling on a web page.