in reply to Re: getpwuid issue
in thread getpwuid issue
So if getpwuid is not implemented or cannot be used in Windows...how do I get the name of the owner of a file ?if (-e $basename) { $attrs = stat($basename); my $fileOwnerID = $attrs->uid; $fileOwner = (getpwuid $fileOwnerID)[0]; #$fileOwner = sprintf "%s",stat($basename)->uid; my $groupID = $attrs->gid; $groupName = (getgrgid $groupID)[0]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: getpwuid issue
by marto (Cardinal) on Dec 02, 2011 at 17:57 UTC |