in reply to chmod/chflags

File::chmod- Implements symbolic and ls chmod modes.

chmod +((stat $file)[2] & 0777), $file;
should work for both chflags and chmod.

Update: Added link tags to url

Replies are listed 'Best First'.
Re: Re: chmod/chflags
by Anonymous Monk on Oct 22, 2001 at 20:15 UTC
    0777 should be 01777 since a-s does not remove the sticky bit.