Posts

Showing posts from March, 2026

Robbie Hatley’s Solutions, in Perl, for The Weekly Challenge #363 (“String Lie Detector” and “Subnet Sheriff”)

Image
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-03-02 through 2026-03-08 is #363. The tasks for challenge #363 are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 363-1: String Lie Detector Submitted by: Mohammad Sajid Anwar You are given a string. Write a script that parses a self-referential string and determines whether its claims about itself are true. The string will make statements about its own composition, specifically the number of vowels and consonants it contains. ( # Example #1 input: "aa — two vowels and zero consonants", # Expected output: true # Example #2 input: "iv — one vowel and one consonant", # Expected output: true # Example #3 input: "hello - three vowels and two consonants", # Exp...