in reply to HELP chgrp
I noticed that the perl version of "chgrp" uses the File::Find module to handle the "-R" (recursive descent into subdirectories) option, and I have to admit that File::Find is one of my pet peeves -- a module with a fairly counter-intuitive, byzantine usage and remarkably slow performance, relative to other techniques for doing the same thing.
Even if you take the trouble to understand the code in the perl version of chgrp, and decide to do a "copy / paste / modify" sort of migration of that code into your own app (this is certainly doable -- it's just not as simple as "use ..." or "require ..." or "do ...", because you really have to copy a subroutine into your script and work out the logic for calling it), even so, the performance of resulting pure-perl approach to changing group ownership on files is going to be noticeably slower than running a system call to the unix version of "chgrp".
So, assuming that you really are on a unix box, I don't know why you are fixating on a pure-perl approach here. (If you aren't on a unix box, I'm not sure what it would mean to do "chgrp" anyway.)
|
|---|