in reply to Re^4: Telling if your script is running from web page or CLI
in thread Telling if your script is running from web page or CLI

The question was specifically about CGI.
Read again the beginning of the original question:
I'd like to be able to call a script via a browser or via the CLI/shell and have that script 'know' what’s calling it
It's not only about CGI, it's about all kinds of dynamic webpages fueled by Perl scripts.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

  • Comment on Re^5: Telling if your script is running from web page or CLI