On Sun, Dec 14, 2008 at 1:28 PM, Adam Jimerson <vend...@charter.net> wrote: > On Dec 12, 12:47 pm, sdav...@mail.nih.gov (Sean Davis) wrote: >> >> You cannot put perl in a webpage the way that you do with PHP. >> However, there are a number of template engines written for and in >> perl that give you similar features. Take a look at Template Toolkit, >> as an example. >> >> Sean > > Are you talking about this, > http://search.cpan.org/~abw/Template-Toolkit-2.20/lib/Template.pm? > If so it doesn't really say what it is for I am completely lost in how > to use it for my needs.
Have a look at: http://template-toolkit.org/ The goal of using a "template language" is to remove all those ugly print statements from your code. Instead, you use the template system to write HTML with a few extra tags in it that can use data that is passed into it to dynamically change parts of it. The main idea, though, is to separate your code (the part that does the database calls, validation, etc.) from the display of the results; the two are nearly orthogonal concerns. Sean -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@perl.org http://learn.perl.org/