diff options
| author | drbaggy <js5@sanger.ac.uk> | 2021-10-19 22:51:10 +0100 |
|---|---|---|
| committer | drbaggy <js5@sanger.ac.uk> | 2021-10-19 22:51:10 +0100 |
| commit | 656374745c58a605f0cf4ee19882f68f17a14820 (patch) | |
| tree | a1c3f398139b424413b2e5ef909bcf197bb77e9f | |
| parent | 492d490a00f12926ff04b355792293fe8ec4842e (diff) | |
| download | perlweeklychallenge-club-656374745c58a605f0cf4ee19882f68f17a14820.tar.gz perlweeklychallenge-club-656374745c58a605f0cf4ee19882f68f17a14820.tar.bz2 perlweeklychallenge-club-656374745c58a605f0cf4ee19882f68f17a14820.zip | |
thanks Eliza - forget ord was one of the functions for which you don't need to include $_ as it works on that automatically
| -rw-r--r-- | challenge-135/james-smith/perl/ch-2.pl | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |
