in reply to find Process ID on Win XP?

In addition to the Perl-based solutions, notice that Windows XP has a tasklist command. For example:

tasklist /fi "imagename eq notepad.exe"
The sysinternals pslist utility will also do the job. You could call these external programs from your Perl script via backticks and scrape their output.