diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2020-10-14 14:03:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-14 14:03:56 +0100 |
| commit | 8f51b9bef2ae0732079656cec3c19c332d94c6e7 (patch) | |
| tree | 920efdf848353e763a252889cd023bd752743475 | |
| parent | a86e289ff2bb02e7c579be9175c92f2667168a28 (diff) | |
| parent | fec62f9b640dbbb94d94b3577dfbbfe1e91e9ca8 (diff) | |
| download | perlweeklychallenge-club-8f51b9bef2ae0732079656cec3c19c332d94c6e7.tar.gz perlweeklychallenge-club-8f51b9bef2ae0732079656cec3c19c332d94c6e7.tar.bz2 perlweeklychallenge-club-8f51b9bef2ae0732079656cec3c19c332d94c6e7.zip | |
Merge pull request #2519 from PerlBoy1967/patch-1
Update ch-2.pl
| -rwxr-xr-x | challenge-082/perlboy1967/perl/ch-2.pl | 4 |
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) { |
