grep myperlscript will always output the PID of the grep process. If you're already running Linux, I recommend looking at Highlander - allow only one invocation at a time of an expensive CGI script, which should give you an idea of how to limit a script to at most one instance.
Alternatively, use grep [m]yperlscript, which is a command line that will not match itself.
In reply to Re^2: Unwanted instances of perl script
by Corion
in thread Unwanted instances of perl script
by rafalwoycicki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |