Perl Weekly Challenge 162: ISBN-13 and Wheatstone-Playfair
These are some answers to the Week 162 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a couple of days from now (on May 1st, 2022 at 24:00). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Task 1: ISBN-13
Write a script to generate the check digit of given ISBN-13 code. Please refer wikipedia for more information.
Example
ISBN-13 check digit for '978-0-306-40615-7' is 7.
This how Wikipedia describes the calculation of the ISBN-13 check digit:
