From http://www.perldoc.com/perl5.8.0/pod/func/lock.html

quote

lock

lock THING

This function places an advisory lock on a shared variable, or referenced object contained in THING until the lock goes out of scope.

lock() is a "weak keyword" : this means that if you've defined a function by this name (before any calls to it), that function will be called instead. (However, if you've said use threads, lock() is always a keyword.) See threads.

unquote

Which would mean that you could lock a FILEHANDLE but it is not the same functionality as flock. Update Or because it is a weak function as simonm pointed out below if the require calls are after its use instead of before it will use the internal lock functin instead of the user defined lock function.

"No matter where you go, there you are." BB

In reply to Re: Re: Has the "require" functionality changed in Perl 5.8.1? by Ninthwave
in thread Has the "require" functionality changed in Perl 5.8.1? by Alatar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.