Perl Weekly Challenge 135: Middle 3-Digits and Validate SEDOL
These are some answers to the Week 135 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on October 24, 2021 at 24:00). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Task 1: Middle 3-digits
You are given an integer.
Write a script find out the middle 3-digits of the given integer, if possible otherwise throw sensible error.
Example 1:
Input: $n = 1234567
Output: 345
Example 2:
Input: $n = -123
Output: 123
Example 3:
Input: $n = 1
Output: too short
Example 4:



