in reply to Re: TIMTOWTDI Challenge: Open a file
in thread TIMTOWTDI Challenge: Open a file
use Fcntl qw(:DEFAULT :flock); sysopen(OUT, $file, O_WRONLY | O_CREAT) or die "Cannot open $file for writing:$!\n"; flock(OUT, LOCK_EX) or die "Cannot get a lock on $file:$!\n";
(That example is pretty much straight out of the book)
Cheers,
Darren :)
|
|---|