in reply to obtaining pid's in Unix environment
You could also look at using a CPAN module: Proc::ProcessTable. While not perfect, it does a good job on most flavors of *nix.