in reply to Embedding Perl into HTML

You can use Mason via CGI, although that would require you getting the modules installed, some of which, may need compiling.
You might look at Text::MicroMason.
It sounds to me though, like you mainly want to use a template for the tables, in that case, there are many templating solutions you could use. Some like Template::Toolkit, others like HTML::Template, others prefer Mason, or Embperl. There are lots of options you can just stick into your script to display the data nicely.

Replies are listed 'Best First'.
Re^2: Embedding Perl into HTML
by awohld (Hermit) on Apr 24, 2005 at 06:22 UTC
    I want to embed perl into the HTML because right now I have the main "index.html" as the blank search page that posts to "search.pl" and all after I do a serch I end up at "http://yourname.com/cgi-bin/search.pl?search=X" where I display all the retrieved info.

    So I'm duplicating my HTML twice, once on "index.html" and once inside "search.pl"

    I guess there must be a better way to do this. Maybe using a header and footer HTML file that is used in both docs? But I wanted to embed Perl into HTML like PHP is done.

      Look at CGI::Application in combo with HTML::Template to eliminate some of the busy stuff in the URI and allows you to use a simple index.cgi to run the flow. Here's a nice little tutorial.


      —Brad
      "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
      Mason, or other things allow what you're asking. A simple fix, rather than duplicating the code, see if you can make 'search.pl' your index page. There is nothing magic about index.html, it's just in many cases, the default page shown if someone requests a directory rather than an absolute file. On most hosts you should be able to change it so that the index is whatever file you like.