Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How do I generate a list of all .html files in a directory?
How do I generate a list of all .html files in a directory?
✍: Guest
Here's a snippet of code that just prints a listing of every file in the current directory that ends with the extension .html:
#!/usr/bin/perl -w
opendir(DIR, ".");
@files = grep(/\.html$/,readdir(DIR));
closedir(DIR);
foreach $file (@files) {
print "$file\n";
}
2013-08-23, 2314👍, 0💬
Popular Posts:
How can we know the number of days between two given dates in PHP? Simple arithmetic: <?php $...
What is the difference between "calloc(...)" and "malloc(...)"? 1. calloc(...) allocates a block of ...
What Happens to Your Transactions When ERROR 1213 Occurred? - MySQL FAQs - Transaction Management: C...
How to create a thread in a program? You have two ways to do so. First, making your class "extends" ...
How To Use an Array as a Queue? - PHP Script Tips - PHP Built-in Functions for Arrays A queue is a s...