in reply to How do I know my process id, from within perl script
With respect to Anonymous Monk's response:
$$ works just fine on my Win32 machine, but $PID fails when use strict is enforced. It fails with the error message:Global symbol "$PID" requires explicit package name at MyNewTest05.pl +line 6. Execution of MyNewTest05.pl aborted due to compilation errors.
That signals to me that $PID is not being set as one of the special Perl variables...at least on my machine. So the OP may need to see which one (if any) of Anonyous Monk's suggested alternatives works for the OP.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How do I know my process id, from within perl script
by Anonymous Monk on Sep 19, 2009 at 06:38 UTC |