> In my perl CGI script, I'm trying to extract the PID > that corresponds to it. > How do I do this? I'm also trying to extract the > timestamp. > How come it's not possible to do something like: > > print "<HTML><BODY>"; > print `time`; > print "</BODY></HTML>";
read `perldoc perlvar` You will find the following entry answers your question. $PID $$ The process number of the Perl running this script. You should consider this variable read-only, although it will be altered across fork() calls. (Mnemonic: same as shells.) As for the time, try $time = localtime(time); print $time; It's a built-in function. HINT: `perdoc -f time` & `perl -f localtime` -- ===================== Shaun Fryer ===================== http://sourcery.ca/ ph: 905-529-0591 ===================== Science is like sex: occasionally something useful comes out of it, but that's not why we do it. -: Richard Feynmann
pgp00000.pgp
Description: PGP signature