The sin of my code fragment was that it violated the commandment of self-containment. ;-) That piece was actually from one of the oldest parts of an ancient and heavily modified source.
Unfortunately, I can't use the bash example right now, since I'm on a Windows box during these hours. Even without the bash shell on this machine, I studied the approach it describes for a while. No light bulb yet, though I feel as though I'm nearing enlightenment on the ENV variables...
I was actually testing my kludgy fix on a Linux box last night, and will try to understand that bash approach more carefully when I'm on that machine. Overall, I am extremely grateful for the kindness that my rather profound ignorance has received here.
However, from considering the last comment (the one after the bash shell idea) I realize that I feel like the best conclusion is to abandon CGI completely and just do it a more direct way. I have (once again) allowed myself to be misled by legacy code, some of which is at least 20 years old.
Perhaps the main reason I stopped being a professional programmer was that my fate appeared to be maintenance programming. I tend to worship the old code and continue fixing it long after it should get the page-one rewrite. (However, I wasn't really joking about switching to Python, since it's my most recent language, and one that I'm studying a bit more systematically. My studies of PERL were never systematic or intense, but there are some aspects of PERL that I found quite intriguing when that old code was bequeathed to me...)
As things stand right now, I am able to use the original PERL with only minor tweaks. I have already assembled a group of reporting commands that cover my primary uses. Clumsy, but adequate for now.
In reply to Re^4: Running a CGI script from a command line?
by shanen
in thread Running a CGI script from a command line?
by shanen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |