Consider adding automatic glob expansion for Perl on Windows, or an opt-in option for it
Hi Strawberry Perl team,
I would like to suggest considering automatic glob expansion for Perl on Windows, or at least providing an option to enable it.
On Unix/Linux, the shell typically expands glob patterns like *.txt before the program receives the arguments. On Windows, this behavior is not available by default, so Perl one-liners that work naturally on Linux often become more awkward on Windows.
For example, a command like:
`perl -ne "print if /foo/" *.log`
is convenient on Linux because the shell expands *.log. On Windows, users usually need extra workarounds, which makes simple one-liners less ergonomic.
It would be great if Strawberry Perl could consider one of the following:
enable glob expansion by default on Windows Perl command lines
provide an option to turn glob expansion on
offer a compatible behavior similar to common Unix shells
This would make cross-platform Perl one-liners much easier to write and port.
Thanks for considering this feature.
2 条评论