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 .wsNow I want to make the wrapper more powerful such that it can also read something like:
perl wrapper.pl test_*.wsThat means all files with name test_xxx.ws should be converted. How can I realize that?
Thanks a lot for your kind help.
In reply to perl glob by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |