my $lockfile = '/tmp/my.lockfile'; $lockfile .= '.with_arg' if $fl_has_arg; check_process($lockfile) and die "Already running!";