From 3c286df018137307d646a03e19b638bab506ede1 Mon Sep 17 00:00:00 2001 From: E7-87-83 Date: Mon, 26 Oct 2020 05:47:24 +0800 Subject: Fix a FLAW in Task 1! --- challenge-083/cheok-yin-fung/perl/ch-1.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'challenge-083') diff --git a/challenge-083/cheok-yin-fung/perl/ch-1.pl b/challenge-083/cheok-yin-fung/perl/ch-1.pl index d52d4a2055..a3168fee61 100644 --- a/challenge-083/cheok-yin-fung/perl/ch-1.pl +++ b/challenge-083/cheok-yin-fung/perl/ch-1.pl @@ -1,4 +1,6 @@ $_ = ; -/(^\w+\s)((\w+\s*)+)(\s\w+$)/; -print length $2,"\n"; +/(^\w+\s)([\w\s*]+)(\s\w+$)/; +$_ = $2; +s/\s//g; +print length, "\n"; -- cgit