my $nperm = $perm & 07777 | 0600; if ($nperm != $perm and not chmod $nperm, $root) { if ($Force_Writeable) { _error($arg, "cannot make file writeable", $canon); } }
% touch foo % ln -s foo bar % ls -l foo bar lrwxrwxrwx 1 niko niko 3 2008-06-21 09:06 bar -> foo -rw-r--r-- 1 niko niko 0 2008-06-21 09:06 foo % perl -e 'use File::Path rmtree; rmtree bar' % ls -l foo bar ls: cannot access bar: No such file or directory -rwxrwxrwx 1 niko niko 0 2008-06-21 09:06 foo