"Chas. Owens" <[email protected]> writes:

> On Fri, Jun 19, 2009 at 09:35, Harry Putnam<[email protected]> 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 '$_': $!";
>     }
>     "/directory/to/chown"
> );

Well ... hehe  I did think of File::Find:
>> Do I have to employ something like File::Find to recursively chown a
>> directory heirarchy.  Or maybe opendir and readdir...

But I probably would never have arrived the nice brief code you've
posted.
Thanks...


-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to