in reply to using javascript in perl
If by "using javascript code" you mean "output Javascript code", then it's easy - you output Javascript code the same as you output any text:
#!/usr/bin/perl -w use strict; use CGI qw(standard); print header; print <<'END_OF_JS' <script> alert("Hello World"); </script> <p>And here comes some text of the rest of the page</p> END
If you mean that you want to run Javascript on your webserver, like for example Domino does (OK, Domino uses LotusScript, but LotusScript is not completely unlike Javascript), then you will have to look for a Javascript machine, for example Javascript::SpiderMonkey. But I doubt that this is the solution you want.
|
|---|