in reply to When to use modules?

LMAO, just look at your "inline syntax". You've proven yourself why you should use CGI. 'expires=+1d' is not a valid cookie expiration. When you pass '+1d' as an expiration date/time to cookie(), a valid date format is created out of that. Not to mention your inline style doesn't output a 'Date' header to accommodate for timezone differences... So yes, use CGI (or one of its equivalents such as CGI::Simple).

Replies are listed 'Best First'.
Re^2: When to use modules?
by Anonymous Monk on Mar 22, 2004 at 07:23 UTC

    Oops, I failed to notice that your CGI version does a manual header output, so it too misses out on the 'Date' header. You should be using print $q->header(-cookie => $cookie); to output the headers.

      The server (apache etc) will usually add the 'Date:' header for you, so it is not needed. Try perl -MCGI -e'print CGI::header()'.

      Your other points remain valid though.