I think perhaps he'd want to use a bit mask of 07777 instead of 0777 so that he could get the set*id bits. In fact, I think there's even an example in perldoc -f stat that shows exactly this.
In reply to Re: Re: converting stat() $mode to unix file permissions
by duff
in thread converting stat() $mode to unix file permissions
by hhoffman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |