opendir

Perl directory list - List all files that match a filename pattern

Summary: A quick Perl tip on how to list all files in a directory that match a given filename pattern, i.e., using the Perl filename "glob" pattern-matching syntax.

As a quick tip today, here's some sample Perl code that prints a listing of every file in the current directory that ends with the filename extension .html: