Since Corion has already given an answer I will just give two pointers: consider reading Ovid's Tutorial and you might want to look at Html::Template or some other Templating system.
#!/usr/bin/perl -w use HTML::Template; my $template = HTML::Template->new(filename => 'test.tmpl'); $template->param(TEXT => "Hello World"); print "Content-Type: text/html\n\n", $template->output;
<html> <body> <script = "javascript"> alert("<TMPL_VAR NAME=TEXT>"); </script> <p>There you go a modified version of Corion's script using HTML::Temp +late.</p> </body> </html>
"Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce
In reply to Re: using javascript in perl
by kutsu
in thread using javascript in perl
by ralijani
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |