in reply to How to expand wildcard arguments supplied to programs with perl on windows?
I don't know about the Wild.pm module you were using, but I was able to get results similar to what you indicated you expected with the following code:
use strict; use warnings; foreach my $pattern (@ARGV) { foreach (glob($pattern)) { print qq{$_\n}; } }
This was called from a Windows Command Prompt using Strawberry Perl as follows: perl test.pl *.txt I used a loop for @ARGV to allow for multiple patterns to be specified on the command line, to give a little extra flexibility.
Hope that helps.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to expand wildcard arguments supplied to programs with perl on windows?
by andalou (Novice) on Aug 17, 2012 at 02:19 UTC | |
by Corion (Patriarch) on Aug 17, 2012 at 05:25 UTC | |
by Anonymous Monk on Aug 17, 2012 at 06:55 UTC |