$permish = 0751; # as returned by stat $b = 01000; ($p = "rwxrwxrwx") =~ s/(.)/($b>>=1)&$permish ? $1 : '-'/ge; print "$p\n";
This doesn't cope with setuid bits, mind you.
In reply to RE: FileMask Conversion
by gnat
in thread FileMask Conversion
by ChOas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |