diff options
| author | robbie-hatley <Robbie.Hatley@gmail.com> | 2024-02-28 23:46:29 -0800 |
|---|---|---|
| committer | robbie-hatley <Robbie.Hatley@gmail.com> | 2024-02-28 23:46:29 -0800 |
| commit | 88348fd9adfb3e102630d4c30cad5423232e28a7 (patch) | |
| tree | 2f7094fbef31f9483341b5084905e232f587db91 | |
| parent | 18dcd5d234317d090d051830403e001340d417d0 (diff) | |
| download | perlweeklychallenge-club-88348fd9adfb3e102630d4c30cad5423232e28a7.tar.gz perlweeklychallenge-club-88348fd9adfb3e102630d4c30cad5423232e28a7.tar.bz2 perlweeklychallenge-club-88348fd9adfb3e102630d4c30cad5423232e28a7.zip | |
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"; |
