in reply to Re-writing CGI.pm

I agree completely with Mssrs. mirod and OeufMayo. If you're doing any sort of real CGI work, use CGI.pm. In fact I think it's bordering on being professionally unethical to not use CGI.pm (or CGI::Lite) on a perl cgi job.

That said, if you're trying to re-write CGI.pm for your own education/amusement, there is no better source to see how things are done than looking at the source for ... CGI.pm!