in reply to Re: converting stat() $mode to unix file permissions
in thread converting stat() $mode to unix file permissions

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.