http://www.perlmonks.org?node_id=18545


in reply to RE: file wildcards in Win32
in thread file wildcards in Win32

This will print all files that end in .h* or just .c. It will list .html files .htm files, etc. Surround the \.h|\.c with parens. Change
if ( $entry =~ /\.h|\.c$) {
to
if ( $entry =~ /(\.h|\.c)$) {
It also won't catch files that end in .H or .C if for some reason those are in caps. You can adjust accordingly.