in reply to How was my script ran?
# Note - not very thoroughly tested if (-t STDIN) { # command-line } elsif (defined $ENV{SERVER_NAME}) { # CGI - I used SERVER_NAME, as it _should_ be set } else { # e-mail }
Now I can't guarantee how portable this is, as I didn't test the e-mail part at all - and I can only test Win2K and FreeBSD. Good luck!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How was my script ran?
by LAI (Hermit) on Mar 05, 2003 at 15:33 UTC | |
by jsprat (Curate) on Mar 05, 2003 at 17:57 UTC |