Not that I have any first-hand knowledge in this area, but does't the previous comment about locking a readonly item hold true for $0 as well?&nbsp; If $0 is readonly, wouldn't that also cause the lock to fail?<br><br><div><span class="gmail_quote">
On 12/13/05, <b class="gmail_sendername">jerry gay</b> &lt;<a href="mailto:jerry.gay@gmail.com">jerry.gay@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 12/13/05, jerry gay &lt;<a href="mailto:jerry.gay@gmail.com">jerry.gay@gmail.com</a>&gt; wrote:<br>&gt; i have now had the pleasure of experiencing this scenario. not giving<br>&gt; up on my favorite hack (above,) and finding a reference in my notes to
<br>&gt; it's source, i found and modified a similar locking example that works<br>&gt; on platforms which don't allow exclusive locks on read-only files.<br>&gt;<br>&gt; INIT {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; open ME =&gt; '+&lt;', $0 or die &quot;can't lock&quot;;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; flock ME =&gt; LOCK_EX | LOCK_NB&nbsp;&nbsp;or exit 1;<br>&gt; }<br>&gt;<br>of course, i forgot to provide the source... <a href="http://perl.plover.com/yak/flock/">http://perl.plover.com/yak/flock/</a><br>~jerry<br>_____________________________________________________________
<br>Seattle Perl Users Group Mailing List<br>&nbsp;&nbsp;&nbsp;&nbsp; POST TO: <a href="mailto:spug-list@pm.org">spug-list@pm.org</a><br>SUBSCRIPTION: <a href="http://mail.pm.org/mailman/listinfo/spug-list">http://mail.pm.org/mailman/listinfo/spug-list
</a><br>&nbsp;&nbsp;&nbsp;&nbsp;MEETINGS: 3rd Tuesdays, Location: <a href="http://Amazon.com">Amazon.com</a> Pac-Med<br>&nbsp;&nbsp;&nbsp;&nbsp;WEB PAGE: <a href="http://seattleperl.org/">http://seattleperl.org/</a><br></blockquote></div><br><br clear="all"><br>
-- <br>Ben Prew<br><a href="mailto:ben.prew@gmail.com">ben.prew@gmail.com</a>