sub search_files { if ($USE_DBM) { while (($file, $file_path) = each(%f_file_db)) { search_contents($file, $file_path); } } else { my $file_count = 0; open (FILEDB, $DATABASEFILE) || die "Sorry, can't open database file.\n"; foreach () { $file_count++; ($f_file_db{$file_count}, $filenames_db{$file_count}, $f_date_db{$file_count},$f_size_db{$file_count},$f_termcount_db{$file_count},$descriptions_db{$file_count},$titles_db{$file_count},$contents_db{$file_count},$alt_text_db{$file_count},$meta_description_db{$file_count},$meta_keywords_db{$file_count},$meta_author_db{$file_count},$links_db{$file_count}) = split /\t/, $_; my $filepath = $f_file_db{$file_count}; search_contents($file_count, $filepath); } close(FILEDB); } }