aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels van Dijke <65567640+PerlBoy1967@users.noreply.github.com>2020-10-14 13:54:58 +0200
committerGitHub <noreply@github.com>2020-10-14 13:54:58 +0200
commitfec62f9b640dbbb94d94b3577dfbbfe1e91e9ca8 (patch)
tree920efdf848353e763a252889cd023bd752743475
parenta86e289ff2bb02e7c579be9175c92f2667168a28 (diff)
downloadperlweeklychallenge-club-fec62f9b640dbbb94d94b3577dfbbfe1e91e9ca8.tar.gz
perlweeklychallenge-club-fec62f9b640dbbb94d94b3577dfbbfe1e91e9ca8.tar.bz2
perlweeklychallenge-club-fec62f9b640dbbb94d94b3577dfbbfe1e91e9ca8.zip
Update ch-2.pl
Remove unused 'use Data::Printer' and 'gc' flags on main regexp.
-rwxr-xr-xchallenge-082/perlboy1967/perl/ch-2.pl4
1 files changed, 1 insertions, 3 deletions
diff --git a/challenge-082/perlboy1967/perl/ch-2.pl b/challenge-082/perlboy1967/perl/ch-2.pl
index e2756ba3f2..483f020e10 100755
--- a/challenge-082/perlboy1967/perl/ch-2.pl
+++ b/challenge-082/perlboy1967/perl/ch-2.pl
@@ -10,8 +10,6 @@
use strict;
use warnings;
-use Data::Printer;
-
@ARGV = qw(4X 123X678 1234XX678)
unless (scalar @ARGV >= 3);
@@ -20,7 +18,7 @@ my ($A, $B, $C) = @ARGV;
my $res = 'NONE';
if (length($A) + length($B) == length($C) and
- $C =~ m#^((?<A1>.*?)$B(?<A2>.*)|(?<B1>.*?)$A(?<B2>.*))$#gc) {
+ $C =~ m#^((?<A1>.*?)$B(?<A2>.*)|(?<B1>.*?)$A(?<B2>.*))$#) {
if (($+{A1} // '').($+{A2} // '') eq $A) {
$res = "$+{A1}|$B|$+{A2}";
} elsif (($+{B1} // '').($+{B2} // '') eq $B) {