This might be useful... __CODE__ use Fcntl qw/O_WRONLY O_CREAT O_EXCL/; open(FH, "<", $file) or sysopen(FH, $file, O_WRONLY | O_CREAT | O_EXCL) or die "can't create new file $file: $!";
__CODE__ Thanks, Chandrashekar On Tue, Nov 23, 2010 at 5:31 PM, Gopal Karunakar <gk.kalipuray...@gmail.com>wrote: > Hi All, > > I want to check whether a particular file (a simple text file) is open > in the UNIX environment. i.e. I want to make sure that its not getting > written into by some other process before my Perl process open it. So that > it will always get a complete file. Is there some way of making sure of > this?? > > Thanks & Regards, > > GK. >