Robbie Hatley's Solutions, in Perl, for The Weekly Challenge #323 (“Increment Decrement” and “Tax Amount”)
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-05-26 through 2025-06-01 is #323 The tasks for challenge #323 are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 323-1: Increment Decrement Submitted by: Mohammad Sajid Anwar You are given a list of operations. Write a script to return the final value after performing the given operations in order. The initial value is always 0. Possible Operations: ++x or x++: increment by 1 --x or x--: decrement by 1 Example #1: Input: @operations = ("--x", "x++", "x++") Output: 1 Operation "--x" => 0 - 1 => -1 Operation "x++" => -1 + 1 => 0 Operation "x++" => 0 + 1 => 1 Example #2: Input: @operations = ("x++", "++x", ...