Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

chgrp in perl??

Status
Not open for further replies.

gkmccone

Technical User
Oct 24, 2001
17
US
Without doing a system call from Perl, does anyone know how to change the group permissions on a file/dir?

If there is a method, does anyone know if it will work for "nix" and Win32?
 
Use Perl's built-in chown() command

chown -1, $gid, @files;

Where $gid must be numeric. the -1 tells chown to leave the owner unchanged.
see perldoc -f chown

jaa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top