aboutsummaryrefslogtreecommitdiff
path: root/challenge-282
diff options
context:
space:
mode:
authorLuis Mochan <mochan@fis.unam.mx>2024-08-13 09:37:36 -0600
committerLuis Mochan <mochan@fis.unam.mx>2024-08-13 09:37:36 -0600
commit00fb2cc2fda243e9891584213da5c95e2508977a (patch)
treea21280a8bf83147c302154438035be4a8c750e12 /challenge-282
parentc79751a718743c055e403e0685d5ea822f817009 (diff)
downloadperlweeklychallenge-club-00fb2cc2fda243e9891584213da5c95e2508977a.tar.gz
perlweeklychallenge-club-00fb2cc2fda243e9891584213da5c95e2508977a.tar.bz2
perlweeklychallenge-club-00fb2cc2fda243e9891584213da5c95e2508977a.zip
Correct mistake
Diffstat (limited to 'challenge-282')
-rwxr-xr-xchallenge-282/wlmb/perl/ch-1.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-282/wlmb/perl/ch-1.pl b/challenge-282/wlmb/perl/ch-1.pl
index 9aa15f4494..924be087f3 100755
--- a/challenge-282/wlmb/perl/ch-1.pl
+++ b/challenge-282/wlmb/perl/ch-1.pl
@@ -11,8 +11,8 @@ die <<~"FIN" unless @ARGV;
ARG: for(@ARGV){
my $arg=$_;
warn "Expected only digits: $_" unless /^\d+$/;
- while(s/((.)\2\2(\2*))//){
- say("$arg -> $1"), next ARG unless $3;
+ while(s/.*?((.)\2\2(\2*))//){
+ say("$arg -> $1"), next ARG if $3 eq "";
}
say "$arg -> -1"
}