diff options
| -rw-r--r-- | challenge-059/e-choroba/blog.txt | 1 | ||||
| -rwxr-xr-x | challenge-059/e-choroba/perl/ch-2.pl | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/challenge-059/e-choroba/blog.txt b/challenge-059/e-choroba/blog.txt new file mode 100644 index 0000000000..7692d6072b --- /dev/null +++ b/challenge-059/e-choroba/blog.txt @@ -0,0 +1 @@ +http://blogs.perl.org/users/e_choroba/2020/05/perl-weekly-challenge-059-linked-list-and-bit-sum.html diff --git a/challenge-059/e-choroba/perl/ch-2.pl b/challenge-059/e-choroba/perl/ch-2.pl index f9cde1626c..5a8e182b01 100755 --- a/challenge-059/e-choroba/perl/ch-2.pl +++ b/challenge-059/e-choroba/perl/ch-2.pl @@ -4,8 +4,7 @@ use strict; sub diff_bits { my ($x, $y) = @_; - my ($bx, $by) = map { pack 'N', $_ } $x, $y; - return unpack '%32b*', $bx ^ $by + return unpack '%32b*', pack 'N', $x ^ $y } sub chain_diff_bits { |
