in reply to call javascript from perl

If you really want to call the JavaScript interpreter from perl, use JavaScript::SpiderMonkey.