X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=samples%2Fwc2re.pl;h=29603163145075ed29a8b2f79bc413006d9be092;hb=HEAD;hp=4c6c3404e80d882c9184f9eb979a99f5e5957cc8;hpb=46111541589202352d6a6a665eb03fe24e3861a6;p=perl%2Fmodules%2FRegexp-Wildcards.git diff --git a/samples/wc2re.pl b/samples/wc2re.pl index 4c6c340..2960316 100755 --- a/samples/wc2re.pl +++ b/samples/wc2re.pl @@ -3,9 +3,16 @@ use strict; use warnings; -use Regexp::Wildcards qw/wc2re/; +use lib qw; -my $type = (grep $^O eq $_, qw/dos os2 MSWin32 cygwin/) ? 'win32' : 'unix'; +use Regexp::Wildcards; +use Data::Dumper; -print "For this system, type is $type\n"; -print $_, ' => ', wc2re($_ => $type), "\n" for @ARGV; +my $rw = Regexp::Wildcards->new( + do => [ qw ], + capture => [ qw ], +); +$rw->do(add => [ qw ]); +$rw->capture(add => [ qw ]); + +print $_, ' => ', $rw->convert($_), "\n" for @ARGV;