begin Jeff Newmiller <[EMAIL PROTECTED]> 
> 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.
 
ahhh... ok, that explains why it didn't work.

> 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.
 
much more elegant.  thanks!

pete
_______________________________________________
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to