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
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
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
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
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
> >
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
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::
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
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($
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
> 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
11 matches
Mail list logo