Robbie Hatley's Solutions, in Perl, for The Weekly Challenge #343 (“Zero Friend” and “Champion Team”)
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-10-13 through 2025-10-19 is #343. The tasks for challenge #343 are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 343-1: Zero Friend Submitted by: Mohammad Sajid Anwar You are given a list of numbers. Find the number that is closest to zero and return its distance to zero. Example #1: Input: (4, 2, -1, 3, -2) Output: 1 Example #2: Input: (-5, 5, -3, 3, -1, 1) Output: 1 Example #3: Input: (7, -3, 0, 2, -8) Output: 0 Example #4: Input: (-2, -5, -1, -8) Output: 1 Example #5: Input: (-2, 2, -4, 4, -1, 1) Output: 1 I store an ascending numeric sort of the absolute values of the given numbers in an array, then return the 0th element of that array. Robbie Hatley's Perl Sol...