On Wed, 3 Apr 2002, Peter Jay Salzman wrote:
> i need access to the shell variable $$. tried this:
>
> my $file = $ENV{$};
>
> which didn't work. i managed to do it with:
>
> my $file = `echo $$`;
>
> but i'm curious -- is there a way to access $$ with the ENV hash?
I don't think so. Special shell variables are implemented in the
commandline interpretation, not in ENV.
If you were going to access the $th element of the ENV hash, I think you
would use $ENV{'$'}.
The getppid() function should obtain the parent process id for you.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<[EMAIL PROTECTED]> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...2k
---------------------------------------------------------------------------
_______________________________________________
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech