How can I get the owner name (not only uid) of a file with perl? With stat() function I can retrieve both uid and gid but not the user name, so before starting to reinvent the wheel I'd like to know if there is a simpler way.
Thanks in advance.
Solution: $owner = getpwuid((stat($file))[4]);
In reply to How to get file owner name? by trek1s
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |