MU-VMS Archives

November 1996

MU-VMS@LISTSERV.MIAMIOH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Chris Carman <[log in to unmask]>
Reply To:
Miami University OpenVMS <[log in to unmask]>
Date:
Mon, 4 Nov 1996 10:55:45 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
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/

ATOM RSS1 RSS2