- or download this
return IO::File->new($file, O_WRONLY|O_CREAT|O_EXCL,0644)
|| die "Can't create $file: $!\n";
- or download this
die "Server already running with PID $pid" if kill 0 => $pid;
- or download this
if ($pid =~ /^(\d+)$/) {
$pid = $1;
} else {
die "funky pid read from $file!";
}