Have you looked at Stat::lsMode (alt.)?
It's aimed more towards the inverse of what you're doing, but there's an undocumented function called lsmode that might be of interest...
--k.
In reply to Re: Convert ls listing of -rwxr-xr-x into mode for stat
by Kanji
in thread Convert ls listing of -rwxr-xr-x into mode for stat
by hackdaddy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |