in reply to order in cgi function output ?

There are evil hacks, for example you could tie an ordered hash and pass that to CGI.

But when you need fine graded control over the HTML output, I recommend to use a template system like HTML::Template::Compiled, Template::Toolkit, Template::Alloy.

Replies are listed 'Best First'.
Re^2: order in cgi function output ? (source)
by tye (Sage) on Jan 31, 2008 at 16:15 UTC

    Actually, if you look at the source for CGI::start_html(), you'll see that an ordered hash would make no difference.

    for( start_html({ -title => "title", -style => { -src => [ "/$common_css", "/$css", "/$common_cal_css", "/$cal_css", "/ie.css", ], }, }) ) { s{(<[^>]+/ie\.css[^>]+>)}{<!--[if IE]>$1<![endif]-->}; print; }

    - tye