I guess you are doing something like ps -ef | grep -c progname which will always find its own instance. You can either alter your script so it does a something like | grep -v grep before it counts or as it will find itself with 100% reliabilty you can just --$count to get the correct value.
Cheers,
R.
In reply to Re: Call shell script in Perl
by Random_Walk
in thread Call shell script in Perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |