I have a quick question about process IDs, CGI, and Perl. I know that doing
something like this on a unix machine will print the process ID:
print "$$\n";
Then when I do this:
$ perl pid.pl
it gives me:
570478783
Which is fine, but how come when I keep running the script, I get:
$ perl pid.pl
570478783
$ perl pid.pl
570478783
$ perl pid.pl
570478783
$ perl pid.pl
570478783
Shouldn't the process ID change every time it's run? Basically, all I want is
a unique number every time this script I'm working on is run, and although it
wouldn't be a problem to put in a little counter subroutine, I just figured a
process ID would be easier. Any ideas? Thanks!
-Chris Carman
[log in to unmask]
-http://www.muohio.edu/~carmance/
-http://www.foofighters.com/foo
-http://www.scratchie.com/