Cosmetic: Utilize \Q...\E instead of dumb s/(\W)/\\$1/g as before
authorshort <>
Fri, 28 Jun 2002 22:29:52 +0000 (22:29 +0000)
committershort <>
Fri, 28 Jun 2002 22:29:52 +0000 (22:29 +0000)
 - and further we have also &quotemeta, it hurts

bin/exx

diff --git a/bin/exx b/bin/exx
index c81dafe..b71de1b 100755 (executable)
--- a/bin/exx
+++ b/bin/exx
@@ -32,8 +32,7 @@ my $origdir=cwd;
 for my $fname (@ARGV) {
        my @parsed;
        for my $fmt (sort { length $b<=>length $a; } keys %{+FORMATS}) {
-               (my $fmtt=$fmt)=~s/(\W)/\\$1/g;
-               last if @parsed=$fname=~m#^(.*?)([^/]+)([.=])($fmtt)$#i;
+               last if @parsed=$fname=~m#^(.*?)([^/]+)([.=])(\Q$fmt\E)$#i;
                }
        $parsed[3] or die "Extension not found for archive: $fname";
        my($path,$base,$ext)=@parsed[0,1,3];