On 6/19/09 Fri Jun 19, 2009 8:44 AM, "Harry Putnam" <rea...@newsguy.com> scribbled:
> "Chas. Owens" <chas.ow...@gmail.com> writes: > >> On Fri, Jun 19, 2009 at 09:35, Harry Putnam<rea...@newsguy.com> wrote: >>> How to manage a recursive chown using perl function chown? >>> >>> Do I have to employ something like File::Find to recursively chown a >>> directory heirarchy. Or maybe opendir and readdir... >>> >>> Or is there some simpler way? >> snip >> >> Whenever you want to walk a directory tree you should think of >> [File::Find][1]: >> >> find( >> sub { >> chown 100, 100, $_ >> or die "could not chown '$_': $!"; >> } You need a comma at the end of the above line. find is a subroutine with two arguments. See 'perldoc File::Find' for details. >> "/directory/to/chown" >> ); > > Does something else need to be done at "/directory/to/chown"? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/