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

[MacPerl] trouble with -w



I have a pair of text files on my (unlocked, writable) hard disk "hd":
"foo" is locked, "bar" is unlocked in the Finder. If I run the following
script under the latest Perl 5 (just got a new MPW tool from the ftp site
this afternoon), I get unexpected results.

print "write to foo\n" if (-w "hd:foo");  # this one is locked
print "write to bar"\n if (-w "hd:bar");  # this one is unlocked

results:

write to foo
write to bar


Same results with "-W" and "-w". Other tests (-e, -s) seem to work as
expected. Any clues?

What's the preferred way to detect a locked file if this isn't it?

Fully prepared to be called a "bonehead",

  dm

------------------------------------------------------------------------------
"They expect you to be a machine to operate this machine." - T. Servo

pub   768/3311B6FD 1995/02/17 Doyle B. Myers <doyle@wrq.com>
          Key fingerprint =  6E 24 E8 AD 9A 5C C8 98  BC C2 CE 10 E4 43 5E F7



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