From: short <> Date: Fri, 28 Jun 2002 22:29:52 +0000 (+0000) Subject: Cosmetic: Utilize \Q...\E instead of dumb s/(\W)/\\$1/g as before X-Git-Tag: bp_liverpm~125 X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=commitdiff_plain;h=87fb5ee57662a571ff00c5c7ca0951c871e142a6 Cosmetic: Utilize \Q...\E instead of dumb s/(\W)/\\$1/g as before - and further we have also "emeta, it hurts --- 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];