From 87fb5ee57662a571ff00c5c7ca0951c871e142a6 Mon Sep 17 00:00:00 2001 From: short <> Date: Fri, 28 Jun 2002 22:29:52 +0000 Subject: [PATCH 1/1] Cosmetic: Utilize \Q...\E instead of dumb s/(\W)/\\$1/g as before - and further we have also "emeta, it hurts --- bin/exx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/exx b/bin/exx index c81dafe..b71de1b 100755 --- 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]; -- 1.8.3.1