If you're accessing files on a UNIX file system with MacPerl, you're out of my realm of experience; however, if you just want to change the Lock attribute on a Macintosh file, you'll probably want to use: #!perl -w use Mac::Files; my($filename) = 'filename'; FSpRstFLock($filename); open(FH, ">>$filename"); print FH "some text"; close(FH); exit(0); This is from p. 182 of Vicki Brown and Chris Nandor's excellent book, MacPerl Power and Ease: http://yggdrasil.com/~rdm/MP/320.Toolbox.html#03 It's also in the documentation for Mac::files (files.pm). See MacPerl > Help > Macintosh Toolbox Modules > File Manager. Robert Richard Christensen wrote: > Before someone yells RTFM, I did try chmod(0666,$file); > But the command always dies instead. I can unlock the file in ResEdit, > but not through MacPerl. The stange thing is, when I try to lock a file > using the Get Info box, I get a dialog that says that I do not have > enough permissions to lock or unlock a file. But I have no problem when > using ResEdit. Any ideas? ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch