On Wed, 28 Aug 2002, Andre Warnier wrote: > Message text written by "T&C Winquist" > > > Here's how I get all the files of a directory. I'm sure there are a > hundred > ways of doing it: > > ... > > > yeah (TMTOWTDI), here's another : > > opendir(DIR,"mydir") or die "$!"; > my @DirGlob = readdir(TMPDIR); # get all entries at once > closedir(DIR); > @DirGlob = grep(-f, @DirGlob); # keep only files ? >
OK, then here's a small revision of yours: opendir(DIR,"mydir") or die "$!"; @DirGlob = grep {-f} readdir(TMPDIR); # keep only files ? closedir(DIR); **** [EMAIL PROTECTED] <Carl Jolley> **** All opinions are my own and not necessarily those of my employer **** _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs