From 656374745c58a605f0cf4ee19882f68f17a14820 Mon Sep 17 00:00:00 2001 From: drbaggy Date: Tue, 19 Oct 2021 22:51:10 +0100 Subject: thanks Eliza - forget ord was one of the functions for which you don't need to include $_ as it works on that automatically --- 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 e0911fe6bd..2442b6abd6 100644 --- a/challenge-135/james-smith/perl/ch-2.pl +++ b/challenge-135/james-smith/perl/ch-2.pl @@ -40,7 +40,7 @@ sub is_sedol { sub is_sedol_compact { 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+=(/\d/?$_:-55+ord)*pop@w for split//,$_[0]; $t%10?0:1 } -- cgit