in reply to
How can a script know if it's a cgi?
Check
this site
where you can see which enviroment variables are set.
T
I
M
T
O
W
T
D
I
Comment on
Re: How can a script know if it's a cgi?
In Section
Seekers of Perl Wisdom