in reply to Re: Yet Another Unitialized Value Questionin thread Yet Another Unitialized Value Question
undef $lock; if ($lock) ... [download]
Have you tried using the debugger?