in reply to Re^2: call js function from CGI?
in thread call js function from CGI?

The code works for me in Perl:

>perl -le "print '<script>reload_foobar function();</script>';" <script>reload_foobar function();</script>

but this doesn't look very much like JavaScript to me:

reload_foobar function();

Maybe you can tell us what you want to do. Maybe you can also describe how Javascript::SpiderMonkey is overkill and how what you want can be done with less than pulling in a complete Javascript interpreter.