Note that in the example, the $unixmode will come out in decimal mode. You may therefore prefer to use the following code to convert the output to the more common octal format:
$unixmode = sprintf("04%o", (stat $filename)[2] & 07777)In reply to Re: Re: converting stat() $mode to unix file permissions
by knowmad
in thread converting stat() $mode to unix file permissions
by hhoffman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |