From: kimanhtle on
I would like to do a recursive read of a directory on my local
computer. Is this possible with File::Find? If not, is there any other
way to do it in Perl?
From: John W. Krahn on
kimanhtle(a)gmail.com wrote:
> I would like to do a recursive read of a directory on my local
> computer. Is this possible with File::Find?

Yes.

> If not, is there any other way to do it in Perl?

TMTOWTDI

http://search.cpan.org/search?query=File%3A%3AFind&mode=all


John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
From: kimanhtle on
On Apr 22, 6:54 pm, "John W. Krahn" <some...(a)example.com> wrote:
> kimanh...(a)gmail.com wrote:
> > I would like to do a recursive read of a directory on my local
> > computer. Is this possible with File::Find?
>
> Yes.
>
> > If not, is there any other way to do it in Perl?
>
> TMTOWTDI
>
> http://search.cpan.org/search?query=File%3A%3AFind&mode=all
>
> John
> --
> Perl isn't a toolbox, but a small machine shop where you
> can special-order certain sorts of tools at low cost and
> in short order. -- Larry Wall


Thanks! Would you happen to have an example? I only got it to work for
a UNIX path not a path on my local computer. It could be I didn't
escape the path right. For example, if I have "C:\projects\docs
\HUNGER_AWARENESS_04212008", would I have to pass it as "C:\\projects\
\docs\\HUNGER_AWARENESS_04212008"?

From: John W. Krahn on
kimanhtle(a)gmail.com wrote:
>
> On Apr 22, 6:54 pm, "John W. Krahn" <some...(a)example.com> wrote:
>>
>> kimanh...(a)gmail.com wrote:
>>>
>>> I would like to do a recursive read of a directory on my local
>>> computer. Is this possible with File::Find?
>>
>> Yes.
>>
>>> If not, is there any other way to do it in Perl?
>>
>> TMTOWTDI
>>
>> http://search.cpan.org/search?query=File%3A%3AFind&mode=all
>
> Thanks! Would you happen to have an example? I only got it to work for
> a UNIX path not a path on my local computer. It could be I didn't
> escape the path right. For example, if I have "C:\projects\docs
> \HUNGER_AWARENESS_04212008", would I have to pass it as "C:\\projects\
> \docs\\HUNGER_AWARENESS_04212008"?

Or 'C:/projects/docs/HUNGER_AWARENESS_04212008' should work as well.


John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
From: A. Sinan Unur on
kimanhtle(a)gmail.com wrote in news:9c1c4e83-24cb-4a0a-a888-9f191ff99111
@w7g2000hsa.googlegroups.com:

> On Apr 22, 6:54 pm, "John W. Krahn" <some...(a)example.com> wrote:
>> kimanh...(a)gmail.com wrote:
>> > I would like to do a recursive read of a directory on my local
>> > computer. Is this possible with File::Find?
>>
>> Yes.
>>
>> > If not, is there any other way to do it in Perl?
>>
>> TMTOWTDI
>>
>> http://search.cpan.org/search?query=File%3A%3AFind&mode=all
>>
>> John
>> --

[ don't quote sigs ]

>
> Thanks! Would you happen to have an example? I only got it to work for
> a UNIX path not a path on my local computer. It could be I didn't
> escape the path right. For example, if I have "C:\projects\docs
> \HUNGER_AWARENESS_04212008", would I have to pass it as "C:\\projects\
> \docs\\HUNGER_AWARENESS_04212008"?

From perlfaq5:

Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp
\foo.exe` work?

We are not going to write your code for you when the documentation
contains both working examples and answers to frequently answered
questions.

Sinan

--
A. Sinan Unur <1usa(a)llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/