Robbie Hatley's Solutions, in Perl, for The Weekly Challenge #334 (“Range Sum” and “Nearest Valid Point”)
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-08-11 through 2025-08-17 is #334 The tasks for challenge #334 are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 334-1: Range Sum Submitted by: Mohammad Sajid Anwar You are given a list integers and pair of indices. Write a script to return the sum of integers between the given indices (inclusive). Example #1: Input: @ints = (-2, 0, 3, -5, 2, -1), $x = 0, $y = 2 Output: 1 Example #2: Input: @ints = (1, -2, 3, -4, 5), $x = 1, $y = 3 Output: -3 Example #3: Input: @ints = (1, 0, 2, -1, 3), $x = 3, $y = 4 Output: 2 Example #4: Input: @ints = (-5, 4, -3, 2, -1, 0), $x = 0, $y = 3 Output: -2 Example #5: Input: @ints = (-1, 0, 2, -3, -2, 1), $x = 0, $y = 2 Output: 1 This is just a matter of using "sum0...