Skip Navigational Links
LISTSERV email list manager
LISTSERV - LISTSERV.MIAMIOH.EDU
LISTSERV Menu
Log In
Log In
LISTSERV 17.5 Help - MU-VMS Archives
LISTSERV Archives
LISTSERV Archives
Search Archives
Search Archives
Register
Register
Log In
Log In

MU-VMS Archives

November 1996

MU-VMS@LISTSERV.MIAMIOH.EDU

Menu
LISTSERV Archives LISTSERV Archives
MU-VMS Home MU-VMS Home
MU-VMS November 1996

Log In Log In
Register Register

Subscribe or Unsubscribe Subscribe or Unsubscribe

Search Archives Search Archives
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:
Re: OpenVMS, Perl, and Process IDs
From:
Randy Kaelber <[log in to unmask]>
Reply To:
Miami University OpenVMS <[log in to unmask]>
Date:
Mon, 4 Nov 1996 13:26:20 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
Chris Carman ([log in to unmask]) wrote:
> 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!
 
Hmmmm.... That should work the way you expected it. I did it on my
machine and got exectly the behaviour I expected. What system are you
running this script on?
 
Unless highly predictable numbers would be a no no, you could also use
the time() function to do what you're wanting. What is the purpose of
generating the number?
 
--
Randy Kaelber:  [log in to unmask]
DARS Programmer/Analyst, Miami University, Oxford, OH 45056 USA
http://avian.dars.muohio.edu/~randy/

ATOM RSS1 RSS2

LISTSERV.MIAMIOH.EDU CataList Email List Search Powered by LISTSERV