Excellent question. Personally, this is exactly what I use templating for. Though it can be done with HTML embedded in the Perl, this is not an optimal solution. I would recommend checking out Template Toolkit or HTML::Template. Either of these can be good choices.
Essentially, what's involved is creating a data structure that holds your data and pass it to the template for processing. You can read through the Template Toolkit docs and specifically read the dynamic content via CGI script section.
If you don't need the full power of Template Toolkit, you can read my short tutorial on using HTML::Template.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to Re: passing variables from cgi to javascript
by Ovid
in thread passing variables from cgi to javascript
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |