Robbie Hatley's Solutions, in Perl, for The Weekly Challenge #332 (“Binary Date” and “Odd Letters”)
For those not familiar with "The Weekly Challenge", it is a weekly programming puzzle with two parts, with a new pair of tasks each Monday. You can find it here: The Weekly Challenge The Weekly Challenge for the week of 2025-07-28 through 2025-08-03 is #332 The tasks for challenge #332 are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 332-1: Binary Date Submitted by: Mohammad Sajid Anwar You are given a date in the format YYYY-MM-DD. Write a script to convert it into binary date. Example #1: Input: $date = "2025-07-26" Output: "11111101001-111-11010" Example #2: Input: $date = "2000-02-02" Output: "11111010000-10-10" Example #3: Input: $date = "2024-12-31" Output: "11111101000-1100-11111" To solve this, I'll make two subroutines: "dec2bin" which converts positive integers expressed as strings of decimal digits into strings of binary digits, and "d...