[EMAIL PROTECTED] wrote: > Hi to All, > I' d like to know if it' s possible to count the exact number of files > inside a certain directory, using a way better than this: > > use CGI; > > my $q = new CGI; > my $dir = 'C:\...\temp'; > my $num_files = -1; > > print $q->header("text/html"); > > local *DIR; > opendir (DIR, $dir); > $num = $num_files++ while readdir (DIR); > closedir DIR; > print $num;
does glob() work on windoze? ie.- my @files = glob('c:\...\temp\*.*'); print "number of files is ", scalar(@files), "\n"; for more info: perldoc -f glob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]