in reply to How to get file owner name?

I never used it, but I suppose you can use getpwuid for that.

Update: this should work

my $uid = (stat $filename)[4] my $user = (getpwuid $uid)[0]

Replies are listed 'Best First'.
Re^2: How to get file owner name?
by trek1s (Scribe) on Sep 10, 2007 at 09:47 UTC
    That's what I needed.

    Thank you very much.

      use File::stat; use User::pwent;
      Should I Install the User::pwent module for the code to work?
      I am getting the error "The getpwuid function is unimplemented"

      The world is so big for any individual to conquer

        getpwuid is a *NIX/POSIX-ism. Odds are you're on an OS which isn't (or which makes a very poor showing of) POSIX-compatible (e.g. Windows).

        I'm not loading any additional module (just "use strict;"), it does not seem to be necessary.

        Which version of Perl are you using?