in reply to How to chgrp in perl?

Did you search perlmonks? Did you google?

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: Re: How to chgrp in perl?
by neniro (Priest) on Apr 04, 2004 at 11:52 UTC
    The solutions i saw, searching Perlmonks, use chown and numerical-IDs. They resolve these by using getpwnam. I'd like to enhance my script, described in Using perl for creating project folders, in a way that it is possible to declare group rights in the xml-schema. It is much more flexible if i can use groupnames instead of numerical IDs.
      getgrnam, in scalar context, returns the group ID of the named group:
      my $gid = getgrnam("users");
      Now you can use the chown function.

      perldoc -f getgrnam gives more detailed information about getgrnam (and its sibling functions).

      Arjen

        That really helps me.
        Thanks a lot!

        neniro