CGI.pm has a debugging mode that you can use to run your program from the command line and pass your CGI parameters as a key / value.
It has another function that you can use to save your settings in a file , and then read this file later.
What I did was added code to save the parameters to a file and launch my program through a browser. It also eases my ability to ensure that the browser sends the correct data.
Then I change the code to read the parameters from the file, and run it as often as I need until I have everything else debugged.
Once the program is satisfied from the command line, you can run it through nytprof to find out what happens all the time.
source share