Perl Weekly Challenge 230: Separate Digits
These are some answers to the Week 230, Task 1, 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 August 20, 2023 at 23:59). 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: Separate Digits
You are given an array of positive integers.
Write a script to separate the given array into single digits.
Example 1
Input: @ints = (1, 34, 5, 6)
Output: (1, 3, 4, 5, 6)
Example 2
Input: @ints = (1, 24, 51, 60)
Output: (1, 2, 4, 5, 1, 6, 0
This task is very simple. We just need to split each value of the input array into individual digits and collect them into a list or an array.

