It would be nice for Perl scripts on Windows to work like they do on Linux with regard to wildcard containing file names.
For example:
perl myscript.pl *.txt
On Linux, bash will expand the *.txt to a set of file names and pass those to the perl interpreter as individual parameters. On Windows, the *.txt gets passed directly into Perl.
So, basically, what I am looking for is something to put at the top of the script that will expand wildcard params, so that the rest of the script can be the same as on Linux.
For example:
myscript.pl
use warnings;
use strict;
# Mystery code to expand all wildcard params, fudging ARGV in the process
# ----
<Insert code here>
# ----
# Rest of script
...
Win32::Autoglobif your Perl doesn’t come with it.PERL5OPTenvironment variable to-MWin32::Autoglobor justuse Win32::Autoglob.