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

[MacPerl] Re: Writable file test broken?




Stewart Leicester wrote:
>>So why doesn't -w work?

Chris Nandor wrote:
>I dunno.  But I never use it, as I consider it Not The Best Way.  What do
>you want to do with the file?  If you want to open the file for writing,
>just do it and check the return value.  There is not much reason to make it
>a two-step process, usually.  First, one step is faster than two; second,
>something could conceivably happen in between the time you check its
>writability and the time you open it, so it is less reliable.

I do not wish to write (or destroy!) anything. We are using a
source-control system which soft-locks files which are not checked out. It
does not make use of 'ckid' resources. There are a number of scripts I
would like to write in perl to automate my workflow. A simple example would
be to list all files which I have checked out. I would like this to run as
fast as possible.

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