Robbie Hatley’s Solutions, in Perl, for The Weekly Challenge #358 (“Max Str Value” and “Encrypted String”)
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 2026-01-26 through 2026-02-01 is #358. The tasks for challenge #358 are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 358-1: Max Str Value Submitted by: Mohammad Sajid Anwar You are given an array of alphanumeric string, @strings. Write a script to find the max "value" of alphanumeric string in the given array which is the numeric representation of the string if it consists of digits only, otherwise the length of the string. Example #1: Input: @strings = ("123", "45", "6") Output: 123 "123" -> 123 "45" -> 45 "6" -> 6 Example #2: Input: @strings = ("abc", "de", "fghi") Output: 4 "abc" -> 3 ...