diff options
| author | Niels van Dijke <65567640+PerlBoy1967@users.noreply.github.com> | 2022-10-04 11:02:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-04 11:02:45 +0200 |
| commit | 236f2b4974f6b87d429a3f8315b710a4543c14c0 (patch) | |
| tree | 90d8db75b4ecb1d52c570160864eab3cc9ba3e15 | |
| parent | 0a2f900e76be04874b9ca7d427c7862b24596d59 (diff) | |
| download | perlweeklychallenge-club-236f2b4974f6b87d429a3f8315b710a4543c14c0.tar.gz perlweeklychallenge-club-236f2b4974f6b87d429a3f8315b710a4543c14c0.tar.bz2 perlweeklychallenge-club-236f2b4974f6b87d429a3f8315b710a4543c14c0.zip | |
Even wackier solution for task 1
| -rwxr-xr-x | challenge-185/perlboy1967/perl/ch-1.pl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/challenge-185/perlboy1967/perl/ch-1.pl b/challenge-185/perlboy1967/perl/ch-1.pl index 145efb72ad..89bb6d33f7 100755 --- a/challenge-185/perlboy1967/perl/ch-1.pl +++ b/challenge-185/perlboy1967/perl/ch-1.pl @@ -24,8 +24,7 @@ use Test::More; sub macFormat ($) { state $re = join '\.', ('([0-9a-f]{2})' x 2) x 3; - return join(':',$1,$2,$3,$4,$5,$6) - if ($_[0] =~ /(?i)^$re$/o); + join ':',($_[0] =~ /(?i)^$re$/go); } |
