Borland's C run-time thinks that glob patterns with * and ? characters are
files or directories. There are no files or directories in the perl source
containing those characters, so give it a helping hand when using -f or -d.
sub expand_glob {
sort { lc $a cmp lc $b }
map {
- -f $_ ? # File as-is.
+ -f $_ && $_ !~ /[*?]/ ? # File as-is.
$_ :
- -d _ ? # Recurse into directories.
+ -d _ && $_ !~ /[*?]/ ? # Recurse into directories.
do {
my @files;
find(