in reply to Re: TIMTOWTDI Challenge: Open a file
in thread TIMTOWTDI Challenge: Open a file

I use sysopen when I want my scripts to play nicely with each other, and observe locking. eg:
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 :)