in reply to Getting process IDs


Here is a simple method. Note, the pid of the perl and ps processes will also show up if $user runs the program.
#!/usr/bin/perl -w use strict; my $user = 'root'; my @procs = `ps -U $user`; shift @procs; # Omit title line my @pids = map { (split)[0] } @procs;

--
John.