如何在Windows上使用Perl在命令行上处理通配符?

chr*_*ris 4 perl windows-xp file-globs

我虽然这很简单,但显然我做不到:

script.pl *.ext

在WinXP命令处理器中.

有内置的解决方案吗?(即不是CPAN模块?)

Sin*_*nür 5

File :: DosGlob是一个核心模块:

#!/usr/bin/perl

use strict;
use warnings;

use File::DosGlob qw( glob );
print map { "$_\n"} map { glob } @ARGV;
__END__
Run Code Online (Sandbox Code Playgroud)
    C:\Temp> tgh *.pl
    ...
    tgh.pl
    tgm.pl
    thg.pl
    thk.pl
    tjl.pl
    tjm.pl
    tkj.pl
    tkl.pl