open(PID, "> $CONF{upd_lockfile}") ; flock(PID, 2); seek(PID, 0, 2); for my $a (@pids) { print(PID "$a\n") if ($a != $$); } flock(PID, 8);