diff options
| author | E7-87-83 <fungcheokyin@gmail.com> | 2021-05-30 19:47:24 +0800 |
|---|---|---|
| committer | E7-87-83 <fungcheokyin@gmail.com> | 2021-05-30 19:47:24 +0800 |
| commit | 037f3f24ff217657e01a30bd4472654a1709cb7a (patch) | |
| tree | b3c9c0780c7791476288e03351bd0184e5118e87 | |
| parent | c8f4bdafd50e91ecaed9ea24b4fb6260278059a3 (diff) | |
| download | perlweeklychallenge-club-037f3f24ff217657e01a30bd4472654a1709cb7a.tar.gz perlweeklychallenge-club-037f3f24ff217657e01a30bd4472654a1709cb7a.tar.bz2 perlweeklychallenge-club-037f3f24ff217657e01a30bd4472654a1709cb7a.zip | |
wk 114, 2 Perl scripts
| -rw-r--r-- | challenge-114/cheok-yin-fung/perl/ch-2.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/challenge-114/cheok-yin-fung/perl/ch-2.pl b/challenge-114/cheok-yin-fung/perl/ch-2.pl index e10b8fe810..b064580101 100644 --- a/challenge-114/cheok-yin-fung/perl/ch-2.pl +++ b/challenge-114/cheok-yin-fung/perl/ch-2.pl @@ -59,7 +59,8 @@ sub hisb { } } -sub bin2dec { #copy from Perl Cookbook +#copy from "Perl Cookbook", by Tom Christiansen & Nathan Torkington +sub bin2dec { return unpack("N", pack("B32", substr("0" x 32 . $_[0], -32))); } |
