# Perl Weekly Challenge 347 Solutions Perl and Python implementations for both tasks of Weekly Challenge 347. ## Task 1: Format Date Convert strings like `10th Nov 2025` into ISO form `2025-11-10` while validating the provided day, month, and year values. - **Perl (`perl/ch-1.pl`)**: Parses the ordinal components with type-checked input and enforces suffix/month/year constraints before formatting. - **Python (`python/ch-1.py`)**: Uses the same parsing logic with type annotations and `unittest` coverage for each provided example. ## Task 2: Format Phone Number Normalize phone numbers that contain digits, spaces, and dashes by removing separators and regrouping the digits according to the challenge rules. - **Perl (`perl/ch-2.pl`)**: Validates allowed characters, strips separators, and creates 3-digit blocks with special handling for the trailing digits. - **Python (`python/ch-2.py`)**: Mirrors the greedy regrouping approach and includes type hints plus example-driven unit tests. ## Running the Solutions - **Perl**: `perl perl/ch-1.pl` or `perl perl/ch-2.pl` - **Python**: `python3 python/ch-1.py` or `python3 python/ch-2.py` - Each script runs only the official example cases as unit tests.