I used the following code but there is a problem with the flock package -
Usage: Fcntl::constant(name, arg) at Fcntl.pm line 225.
The Fcntl module that I am using does not have any "usage" messages in it however the Tie::File module does. Which version of the Tie::File module are you using? You can find out like this:
$ perl -MTie::File -le'print $Tie::File::VERSION' 0.97
If the Fcntl module does not work you could go back to using:
my $LOCK_EX = 2;
And change all occurances of LOCK_EX to $LOCK_EX.

Also, to get the hostname you could use the Sys::Hostname module:

use Sys::Hostname; my $hostname = hostname;
And to get a formatted date you could use the POSIX module:
use POSIX 'strftime'; my $date = strftime '%y%m%d%H%M%S', localtime;

In reply to Re^3: mkfifo/mknode by jwkrahn
in thread mkfifo/mknode by azaria

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.