Re: Process ID

2007-09-24 Thread Matthew Whipple
perldoc -funtie or more thoroughly perldoc perltie untie is the way to go if you're dealing with a tied variable...if you're not then it won't do anything (or at least it shouldn't). The perltie doc will also hint at the greater range of tie'ing available above database hashes. Somu wrote: > I

Re: Process ID

2007-09-24 Thread Matthew Whipple
untie or unlink? You had used unlink previously which closed and deleted a temporary file while close only closes the file which would be the proper way to terminate a pipe such as used in the solution. Somu wrote: > Great! Thanks.. How about using untie instead of close? Can i know , > phat is

Re: Process ID

2007-09-24 Thread John W. Krahn
Ken Foskey wrote: On Mon, 2007-09-24 at 05:13 +0530, Somu wrote: Thanks for the help. I did it using system "tasklist >> temp"; open FH , "temp" ; statements.. unlink ("temp"); #EOF Consider this code snippet then, does this in one step. I am writing the output to a log only you can put

Re: Process ID

2007-09-24 Thread Ken Foskey
On Mon, 2007-09-24 at 05:13 +0530, Somu wrote: > Thanks for the help. I did it using > > system "tasklist >> temp"; > > open FH , "temp" ; > statements.. > unlink ("temp"); #EOF Consider this code snippet then, does this in one step. I am writing the output to a log only you can put all the

Re: Process ID

2007-09-23 Thread shmoib
On Sep 18, 5:34 pm, [EMAIL PROTECTED] (Steve Bertrand) wrote: > Somu wrote: > > How do i find out the process id of any process. When we see the task > > manager in Windows, we can see the programs running in the PC. Is > > there any way to know the same with perl? Does process id of a program > >

Re: Process ID

2007-09-18 Thread Steve Bertrand
Somu wrote: > How do i find out the process id of any process. When we see the task > manager in Windows, we can see the programs running in the PC. Is > there any way to know the same with perl? Does process id of a program > change each time the program is run? #!/usr/bin/perl use warnings; use

Re: Process ID

2007-09-18 Thread Chas Owens
On 9/18/07, Somu <[EMAIL PROTECTED]> wrote: > How do i find out the process id of any process.When we see the task > manager in Windows, we can see the programs running in the PC. Is > there any way to know the same with perl? This is system dependent. For MS Windows machines try Win32::Process::

Re: process id (pls do reply)

2003-09-09 Thread Gavin Laking
On Tue, 9 Sep 2003 22:07:43 +1000 [EMAIL PROTECTED] (Vema Venkata) wrote: > How do i get the process id into a variable ? > can any one help > > $pid = qx(ps -f|grep srvtst26); > print "Server Started : $pid \n Try giving a description of your problem in the subject line it helps. The process

Re: PROCESS ID

2003-08-27 Thread david
Eric Walker wrote: > Hello all > I want to us the variable $< to get the REAL UID of the perl program > that is running. How can I get the users name from that number it gives > me? the getpwuid function in scalar context gives you the user of the uid: [panda]$ perl -le 'print scalar getpwuid($

RE: PROCESS ID

2003-08-27 Thread Eric Walker
I don'tknow if this is the best way but I ended up doing this: my $UID = getpwuid($<); my @GROUPS = split(" ",`groups $UID`); Which gets the groups that the user who is running my script belongs too. correct me if I am wrong? EDOG On Wed, 2003-08-27 at 16:00, Dan Muey wrote: > Hello all

RE: PROCESS ID

2003-08-27 Thread Dan Muey
> Hello all Howdy > I want to us the variable $< to get the REAL UID of the perl > program that is running. How can I get the users name from > that number it gives me? Depends on the system. Have you looked on cpan for a module that does that? You can always qx() the same way you'd do it