http://qs321.pair.com?node_id=460580


in reply to Call shell script in Perl

I guess what your shell script does is probably along the lines of ps -ef | grep abcd? You could do this in Perl entirely, without calling external scripts. You can either call ps -ef, or you could use one of the CPAN modules, such as Proc::ProcessTable or Unix::Process, and do the filtering/counting of program instances yourself. This will give you precise control over what to and what not to select from the process table.