[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl & Databases



On Sun, 3 Jan 1999 18:06:25 -0500, Chris Nandor wrote:

>Your wish is my command.

Thanks a lot, Chris.

But, I goofed up a bit. Indeed, if on "personal OS'es" (Mac, DOS,
probably Windows), the statement

	open(FILE,"+<filename");

works, this will indeed lock the file.

But the open will fail if the file can't be locked. You should try and
repeat, but ONLY if the error is caused by the use of the file in
another program.

In this case, the error code ( $! ) in MacPerl is "Invalid argument".
DJGPP Perl for DOS says "Permission denied (EACCES)"; Ilya's OS/2 port
says "Permission denied". I don't know what other OS's return, but it
could be something completely different. Which makes this task, yet
again, more difficult than it should have been. Sigh.  ;-)

	Bart.

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch