diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2020-05-07 23:50:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-07 23:50:24 +0100 |
| commit | f09541a928476c451009dc166f38c6f7196b9978 (patch) | |
| tree | 6327ae0a03061d158321eeff529ec2420c7cb175 | |
| parent | d440a5be0185fa0543a7db8ebd68b1a5beee7761 (diff) | |
| parent | a0be6e85851b6da6425765237d1096704c2b55df (diff) | |
| download | perlweeklychallenge-club-f09541a928476c451009dc166f38c6f7196b9978.tar.gz perlweeklychallenge-club-f09541a928476c451009dc166f38c6f7196b9978.tar.bz2 perlweeklychallenge-club-f09541a928476c451009dc166f38c6f7196b9978.zip | |
Merge pull request #1682 from choroba/ech059c
Add link to E. Choroba's blog post about 059: Linked List + Bit Sum
| -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 { |
