I\'ve worked some years now in Perl building Web scrapers, and given the problem that spam represents, and how scraping Web pages would turn out to be much more easier to th
You can try to install SpiderMonkey and -in your perl program- execute javascript in backticks, and capture the result, just like from any other unix command line tool. Spidermonkey has a command line option for that, similar to perl's -e command line option. The spidermonkey binary is called "js", thus:
/path/to/spidermonkey/bin/js -e "print(10);"
> 10
I think you can also install v8-shell as an alternative engine, but then you must install 'scons' first, which is available on unix-only.
./v8-shell -e 'print("10*10 = " + 10*10)'