diff options
| author | Mohammad Sajid Anwar <Mohammad.Anwar@yahoo.com> | 2024-02-29 10:02:46 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-29 10:02:46 +0000 |
| commit | 6111b171d28bb6ca171efd736e66721f16760e94 (patch) | |
| tree | 19acc6b37c8d968304dd3ade36e68d41ecdb09ee | |
| parent | 3302325040f623c591a1694e875c8758f6be9926 (diff) | |
| parent | 88348fd9adfb3e102630d4c30cad5423232e28a7 (diff) | |
| download | perlweeklychallenge-club-6111b171d28bb6ca171efd736e66721f16760e94.tar.gz perlweeklychallenge-club-6111b171d28bb6ca171efd736e66721f16760e94.tar.bz2 perlweeklychallenge-club-6111b171d28bb6ca171efd736e66721f16760e94.zip | |
Merge pull request #9672 from robbie-hatley/rh258
Added blog and made slight tweaks to both scripts.
| -rw-r--r-- | challenge-258/robbie-hatley/blog.txt | 1 | ||||
| -rwxr-xr-x | challenge-258/robbie-hatley/perl/ch-1.pl | 2 | ||||
| -rwxr-xr-x | challenge-258/robbie-hatley/perl/ch-2.pl | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/challenge-258/robbie-hatley/blog.txt b/challenge-258/robbie-hatley/blog.txt new file mode 100644 index 0000000000..58b04422e9 --- /dev/null +++ b/challenge-258/robbie-hatley/blog.txt @@ -0,0 +1 @@ +https://hatley-software.blogspot.com/2024/02/robbie-hatleys-solutions-to-weekly_28.html
\ No newline at end of file diff --git a/challenge-258/robbie-hatley/perl/ch-1.pl b/challenge-258/robbie-hatley/perl/ch-1.pl index 3fc50aaca6..61be780c92 100755 --- a/challenge-258/robbie-hatley/perl/ch-1.pl +++ b/challenge-258/robbie-hatley/perl/ch-1.pl @@ -1,2 +1,2 @@ #!/usr/bin/perl -print scalar grep {0==length($_)%2} @ARGV +print scalar grep {0==length($_)%2} @ARGV, "\n"; diff --git a/challenge-258/robbie-hatley/perl/ch-2.pl b/challenge-258/robbie-hatley/perl/ch-2.pl index a217dc5df2..244167d469 100755 --- a/challenge-258/robbie-hatley/perl/ch-2.pl +++ b/challenge-258/robbie-hatley/perl/ch-2.pl @@ -1,4 +1,4 @@ #!/usr/bin/perl use List::Util 'sum0'; my $k = pop @ARGV; -print sum0(@ARGV[grep {$k == sum0(split //, sprintf("%b", $_))} 0..$#ARGV]),"\n"; +print sum0(@ARGV[grep {$k == sum0(split //, sprintf("%b", $_))} 0..$#ARGV]), "\n"; |
