Awhile back we had an issue where a coworker wanted to use one of my Perl CGI scripts inside of her scripts, using the backticks method to have it spit its output to the webpage. But for some reason, my script refuse to recognize the arguments she was passing it. The weird thing was, if we ran her script from the command line, everything worked fine.
The issue is in the way CGI.pm detects whether it is being called from a web browser or from the command line. It checks for the presence of the REQUEST_METHOD environmental variable. If it is present, CGI knows to get its arguments from the web browser.