cgrinder has asked for the wisdom of the Perl Monks concerning the following question:
In order to test it, I've been doing an echo abc >> test.log from the dos prompt on NT. This works just fine and my script prints out the new line with "abc" on it.use IO::Handle; $file = $ARGV[0]; open(INFILE,"< $file"); while(1) { while(<INFILE>) { print("$_"); sleep(5); } INFILE->clearerr(); }
When I open notepad, wordpad or gvim and try to write to the file, it fails and says the file is in use by another process.
Any ideas why it would be locked for writes when I opened it in read only mode?
This is my first post so don't hurt me!!! :)
Thanks...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Unable to write to a file opened in read only mode
by tye (Sage) on Nov 03, 2001 at 12:11 UTC | |
by cgrinder (Initiate) on Nov 05, 2001 at 19:58 UTC | |
|
Re: Unable to write to a file opened in read only mode
by Ven'Tatsu (Deacon) on Nov 03, 2001 at 04:48 UTC | |
by tilly (Archbishop) on Nov 03, 2001 at 07:31 UTC | |
by Anonymous Monk on Nov 03, 2001 at 10:45 UTC | |
by cgrinder (Initiate) on Nov 05, 2001 at 20:05 UTC | |
by Ven'Tatsu (Deacon) on Nov 06, 2001 at 02:10 UTC | |
|
Re: Unable to write to a file opened in read only mode
by Fastolfe (Vicar) on Nov 03, 2001 at 05:43 UTC |