From d24c263a85467f6441432e4b7ff3c2bd69b13c80 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Sun, 14 Feb 2021 04:38:03 +0000 Subject: - Minor comment update by Ulrich Rieke. --- challenge-099/ulrich-rieke/perl/ch-2.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenge-099/ulrich-rieke/perl/ch-2.pl b/challenge-099/ulrich-rieke/perl/ch-2.pl index 7c3e9e1345..65955fc955 100644 --- a/challenge-099/ulrich-rieke/perl/ch-2.pl +++ b/challenge-099/ulrich-rieke/perl/ch-2.pl @@ -40,7 +40,8 @@ sub findSubstrings { push @startpositions, pos $longword ; } #we look for the rest of the chunks from every position in @startpositions - $regex = "\.\+\?" ; #at least one character after the first chunk, greedily + $regex = "\.\+\?" ; #at least one character after the first chunk, + #non-greedily for my $i (1 .. $len - 1 ) { $regex .= "$chunks->[ $i ]" ; if ( $i != $len - 1 ) { -- cgit