in reply to Shortening long and dirty code

maybe you don't want to have your script relying on external modules, but I'm going to mention this anyway: try using a templating system, such as HTML::Template. Your code will be much cleaner, and having your perl code and your html separated is a Good Thing (at least in my book). There are a couple of tutorials here in the monastery that will get you started: this one by jeffa and another one by Ovid.

hope this helps,

Replies are listed 'Best First'.
Re: Re: Shortening long and dirty code
by rob_au (Abbot) on Sep 05, 2003 at 02:19 UTC
    ... and also take a look at CGI::Application for the dispatch mechanism which it provides that would offer a much more discrete and modular separation of execution elements. Even if the CGI::Application is not deployed within the final application, much of the structure and layout of the script provided for review could be better addressed using some of the techniques employed within this module.

    (I have also posted a review on the CGI::Application module previously on this site here).

     

    perl -le "print+unpack'N',pack'B32','00000000000000000000001010000010'"