aboutsummaryrefslogtreecommitdiff
path: root/challenge-099
diff options
context:
space:
mode:
authorMohammad S Anwar <mohammad.anwar@yahoo.com>2021-02-14 04:38:03 +0000
committerMohammad S Anwar <mohammad.anwar@yahoo.com>2021-02-14 04:38:03 +0000
commitd24c263a85467f6441432e4b7ff3c2bd69b13c80 (patch)
treed829f1c61a6c6bc4512b49402cd66561e9498269 /challenge-099
parent9247dd9840b98bb834b5f1263cff286eb3b2f567 (diff)
downloadperlweeklychallenge-club-d24c263a85467f6441432e4b7ff3c2bd69b13c80.tar.gz
perlweeklychallenge-club-d24c263a85467f6441432e4b7ff3c2bd69b13c80.tar.bz2
perlweeklychallenge-club-d24c263a85467f6441432e4b7ff3c2bd69b13c80.zip
- Minor comment update by Ulrich Rieke.
Diffstat (limited to 'challenge-099')
-rw-r--r--challenge-099/ulrich-rieke/perl/ch-2.pl3
1 files changed, 2 insertions, 1 deletions
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 ) {