which tool may i use to make beautiful perl cgi web pages and then insert perl code where i want too?

Perl or no Perl, if you want beautiful pages you'll write them by hand (possibly using an editor with helps, such as cperl-mode in Emacs). The automatic page generation tools (Dreamweaver, Frontpage, Composer, and their ilk) invariably produce very messy code, code that's not maintainable, code that's needlessly bloated, code that's impossible for a human to read if you need to look at it to debug a problem, code that relies so extensively on physical markup (e.g., font tags) that you must abandon all pretense of accessibility, code that won't validate in a billion years, code that relies so heavily on browser quirks that when the next versions of the major browsers come out it will probably break and you'll have to redo it all. The advantages of these tools mostly involve people who don't know very much HTML being able to whip up a bunch of pages quickly. There's nothing beautiful about the results.

My advice if you want to make beautiful pages is to read one of the w3schools tutorials, which will take you all of an hour, get a text editor with good syntax highlighting and automatic indentation, and write the pages by hand. Bonus points if your editor will automatically insert the close tag together with the open tag; this helps greatly in keeping your code wellformed. Oh, and a graphic design course won't hurt, too.

As far as inserting the Perl code, there are two ways to go. You can use embperl, or you can make the whole page a Perl script, sticking the HTML in strings or HERE documents that the script prints. The latter approach is the one I use.

update: Templates are on my list of things I intend to evaluate; my recommendation should not be taken as advice against using templates.


$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

In reply to Re: a Couple of questions! by jonadab
in thread a Couple of questions! by Nik

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.