<?xml version="1.0" encoding="windows-1252"?>
<node id="949311" title="Re^2: Easiest way to protect process from duplication." created="2012-01-23 00:52:19" updated="2012-01-23 00:52:19">
<type id="11">
note</type>
<author id="596967">
gnosti</author>
<data>
<field name="doctext">
Here's a variation that uses the __DATA__ handle.
&lt;code&gt;
use Fcntl qw(LOCK_EX LOCK_NB);
die "Another instance is already running" unless flock DATA, LOCK_EX|LOCK_NB;
&lt;/code&gt;</field>
<field name="root_node">
948994</field>
<field name="parent_node">
949042</field>
</data>
</node>
