http://www.perlmonks.org?node_id=1061564

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

I have just wrote a converter and a simple wrapper that allows to convert all the files with the same extension in one go. The wrapper code as follows:

use warnings; use strict; my $input = shift; my @files; if ($input =~ /^\./) { @files = glob "*$input"; } else { @files = $input; } foreach (@files) { print "$_\n"; system("perl converter.pl $_"); }

It can read commands like:

perl wrapper.pl .ws

Now I want to make the wrapper more powerful such that it can also read something like:

perl wrapper.pl test_*.ws

That means all files with name test_xxx.ws should be converted. How can I realize that?

Thanks a lot for your kind help.