From a7aeb6dfe5a9f7e1e5fe5641fc859711ca5b0e42 Mon Sep 17 00:00:00 2001 From: drbaggy Date: Tue, 19 Oct 2021 19:58:13 +0100 Subject: 1 char shorter --- challenge-135/james-smith/perl/ch-2.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-135/james-smith/perl/ch-2.pl b/challenge-135/james-smith/perl/ch-2.pl index 4af6ee9a24..e0911fe6bd 100644 --- a/challenge-135/james-smith/perl/ch-2.pl +++ b/challenge-135/james-smith/perl/ch-2.pl @@ -38,7 +38,7 @@ sub is_sedol { } sub is_sedol_compact { - return 0if$_[0]!~/^[0-9B-HJ-NP-TW-Z]{6}\d$/; + return 0if$_[0]!~/^[\dB-HJ-NP-TW-Z]{6}\d$/; my($t,@w)=qw(0 1 9 3 7 1 3 1); $t+=(/\d/?$_:-55+ord$_)*pop@w for split//,$_[0]; $t%10?0:1 -- cgit