in reply to Re^2: mkfifo/mknode
in thread mkfifo/mknode
I used the following code but there is a problem with the flock package -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:Usage: Fcntl::constant(name, arg) at Fcntl.pm line 225.
If the Fcntl module does not work you could go back to using:$ perl -MTie::File -le'print $Tie::File::VERSION' 0.97
And change all occurances of LOCK_EX to $LOCK_EX.my $LOCK_EX = 2;
Also, to get the hostname you could use the Sys::Hostname module:
And to get a formatted date you could use the POSIX module:use Sys::Hostname; my $hostname = hostname;
use POSIX 'strftime'; my $date = strftime '%y%m%d%H%M%S', localtime;
|
|---|