From fec62f9b640dbbb94d94b3577dfbbfe1e91e9ca8 Mon Sep 17 00:00:00 2001 From: Niels van Dijke <65567640+PerlBoy1967@users.noreply.github.com> Date: Wed, 14 Oct 2020 13:54:58 +0200 Subject: Update ch-2.pl Remove unused 'use Data::Printer' and 'gc' flags on main regexp. --- challenge-082/perlboy1967/perl/ch-2.pl | 4 +--- 1 file changed, 1 insertion(+), 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#^((?.*?)$B(?.*)|(?.*?)$A(?.*))$#gc) { + $C =~ m#^((?.*?)$B(?.*)|(?.*?)$A(?.*))$#) { if (($+{A1} // '').($+{A2} // '') eq $A) { $res = "$+{A1}|$B|$+{A2}"; } elsif (($+{B1} // '').($+{B2} // '') eq $B) { -- cgit