It looks like you have most of it. All you'd need to do is pass in a different lockfile name if there's an argument vs. without one. Perhaps something like:
my $lockfile = '/tmp/my.lockfile'; $lockfile .= '.with_arg' if $fl_has_arg; check_process($lockfile) and die "Already running!";
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: Conditional Lock File
by roboticus
in thread Conditional Lock File
by bichonfrise74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |