I can't use any modules that aren't standardThere's a standard module called Win32, and you might be able to make use of its GetCurrentProcessId() function.
Here's the documentation for that function:
Win32::GetCurrentProcessId()
Returns the process identifier of the current process. Until the
process terminates, the process identifier uniquely identifies the
process throughout the system.
The current process identifier is normally also available via the
predefined $$ variable. Under fork() emulation however $$ may
contain a pseudo-process identifier that is only meaningful to the
Perl kill(), wait() and waitpid() functions. The
Win32::GetCurrentProcessId() function will always return the regular
Windows process id, even when called from inside a pseudo-process.
Cheers, Rob
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|