Re: File::Find Laments

2003-09-11 Thread Stephen
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote > On Sep 10, Stephen said: > > >> find( { > >> wanted => \&wanted, > >> preprocess = \&preprocess, > >> postprocess = \&postprocess, > >> }, 'C:/SomeFolder'); > > > >Starting to make sense. Just a small question, though. The use of

Re: File::Find Laments

2003-09-11 Thread Stephen
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote > Stephen wrote: > > > > Rob Dixon wrote: > > > > > > > > The code below does the same as the previous program, but uses > 'preprocess' to sort the files in alpha order before thowing the > list at 'wanted'. You could also remove files from the lis

Re: File::Find Laments

2003-09-10 Thread Rob Dixon
Stephen wrote: > > Rob Dixon wrote: > > > > In essence, what File::Find does is > > > > - Read a file directory > > > > - If 'postprocess' is specified then the subroutine is called with > > the list of files as parameters. The subroutine must then return > > a list of those files it is interes

Re: File::Find Laments

2003-09-10 Thread Jeff 'japhy' Pinyan
On Sep 10, Stephen said: >> find( { >> wanted => \&wanted, >> preprocess = \&preprocess, >> postprocess = \&postprocess, >> }, 'C:/SomeFolder'); > >Starting to make sense. Just a small question, though. The use of \& >before the sub name -- my understanding is that the "\" charac

Re: File::Find Laments

2003-09-10 Thread Stephen
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote > > John W. Krahn wrote: > > > > Stephen wrote: > > > > > 4. Maybe I'm restating the above question, but in addition to the > > > &wanted sub, File::find accommodates process, etc., as well. When/how > > > can these are typically used? > > > > Sorr

Re: File::Find Laments

2003-09-10 Thread Rob Dixon
John W. Krahn wrote: > > Stephen wrote: > > > 4. Maybe I'm restating the above question, but in addition to the > > &wanted sub, File::find accommodates process, etc., as well. When/how > > can these are typically used? > > Sorry, I've never used them. You can specify 'preprocess' and 'postproce

Re: File::Find Laments

2003-09-09 Thread John W. Krahn
Stephen wrote: > > In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > wrote > > > > use strict; > > use warnings; > > use File::Find; > > > > my $file_count = 0; > > my $dir_count = 0; > > > > find (\&wanted, "C:/SomeFolder"); > > > > sub wanted { > > if (-d) { > > return unless /

Re: File::Find Laments

2003-09-09 Thread Stephen
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote > > "Stephen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I'm doing my best but having a lot of trouble understanding the > > documentation for File::Find. After seeing a number of people being > > yelled at for trying to reinve

Re: File::Find Laments

2003-09-09 Thread Rob Dixon
"Stephen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm doing my best but having a lot of trouble understanding the > documentation for File::Find. After seeing a number of people being > yelled at for trying to reinvent the wheel by writing their own > functions, I'm resigned