On 09/02/2018 05:04 PM, Rick T wrote:
I am trying to wean myself from CGI.pm, an easy task for most of you, but I am a beginner. The code below works, but that does not mean it always will or that it cannot be improved. I found the main part of this in CGI Programming with Perl, which is 18 years old, and I’ve given up hoping that a new edition of it will come out. I’ve read somewhere that servers can give the wrong value for CONTENT_LENGTH, so I stuck in a second chance before bailing out; and of course this may not be necessary or done well. I look forward to any and all comments. I also would appreciate any guidance on how I can learn more about CGI and how to deal with it. This book has been extremely valuable to me, but even I can see that some of its guidance is a bit creaky! — Rick
weaning yourself away from CGI.pm doesn't mean doing it yourself. the module is old but very stable and does everything correctly.
also for basic web stuff that doesn't need high volume, CGI is a fine and easy way to get things done. i recently worked at an insurance company and many reports and related tasks were all CGI based with no problems and all used CGI.pm.
i would not use your code but go back to CGI.pm as you don't seem to need anything more.
thanx, uri