Use Perl to generate your skeleton? Nonesense. All i do is create a "skeleton" that describes the layout. I usually start by lifting a layout from Box Lessons. Then i either use HTML::Template or Template. Here is a quick skeleton that i used recently with Template-Toolkit:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:/ +/www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="/css/default.css" type="text/css" /> <title>[% title %]</title> </head> <body> <div id="top"> <h1>[% title %]</h1> </div> <div id="left"> [% PROCESS widget/menu.html %] </div> <div id="middle"> [% content -%] </div> <div id="right"> [% PROCESS widget/calendar.html %] </div> <div id="bottom"> [% PROCESS widget/footer.html %] </div> </body> </html>
As you can see, the CSS file is completely seperate and not generated by Perl! Instead, Perl is used to load this template and substitute, etc. This is, IMHO, a much better solution as it allows me to hand my HTML to someone who designs and doesn't code.

So, in conclusion, my experience has been that the more flexible and useful applications of Perl and CSS are to simply template the skeleton and let Perl worry about the data, not the presentation. Otherwise you might as well be using Tk.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

In reply to Re: CSS and perl by jeffa
in thread CSS and perl by bakunin

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.