TABLE OF CONTENTS
1. HEADLINES
2. SPONSOR
3. RECAP
4. PERL REVIEW
5. RAKU REVIEW
6. CHART
7. NEW MEMBERS
8. GUESTS
9. TASK #1: Power String
10. TASK #2: Meeting Point
HEADLINES
Welcome to the Week #349 of The Weekly Challenge.
For two consecutive weeks, we’ve had 90+ contributions. Although we did not cross the magical number, it is a great effort by Team PWC.
I would like to thank all guest contributors for making Week #348, the best week of the entire year 2025. We received 70 contributions in 23 different programming languages. The overall guest contributions for the year, as of today, is 2,516, which is a big number, in my opinion. It’s not as high as last year’s figure of 3,267 but we still have time left to match the year before that 2,629 in 2023.
Talking about numbers, the regular contributions for 2025 are not close to last year’s total but still impressive. As of today, we have received 4,063 contributions in 2025 compared to 5,460 in 2024. That said, we still have a few weeks left to catch up.
The overall contributions figure is looking great, I must admit. We are getting close to 18K contributions in Perl and 10K in Raku, as well as 6.5K blog posts. This is incredible, kudos to the entire Team PWC.
Another number that caught my attention is the total number of pull requests submitted. As of today it is over 13K and that’s considering not every member submits pull request. These numbers tell a very beautiful story.
One more piece of good news: we have now received 200 stars for the central GitHub repository of Club members: https://github.com/manwar/perlweeklychallenge-club.
I need to get started soon on The Weekly Challenge Advent Calendar 2025. For those who are new, we have been doing this every year. Please check out last year’s, Advent Calendar.
Below is my contributions to the Task #1 of Week #348.
Perl: source code
sub string_alike {
my $s = shift;
my $l = length($s)/2;
my $v = substr($s,0,$l) =~ y/aeiouAEIOU//;
return $v > 0 && $v == substr($s,$l) =~ y/aeiouAEIOU// ? 1 : 0;
}
Raku: source code
sub string-alike(Str $s) {
my $l = $s.chars div 2;
my $v = $s.substr(0, $l).comb.grep({ /<[aeiouAEIOU]>/ }).elems;
return ($v > 0 && $v == $s.substr($l).comb.grep({ /<[aeiouAEIOU]>/ }).elems) ?? 1 !! 0;
}
Python: source code
def string_alike(s: str) -> int:
length = len(s) // 2
vowels = "aeiouAEIOU"
v = sum(1 for char in s[:length] if char in vowels)
return 1 if v > 0 and v == sum(1 for char in s[length:] if char in vowels) else 0
Thank you Team PWC, once again.
Happy Hacking!!
Last 5 weeks mainstream contribution stats. Thank you Team PWC for your support and encouragements.
Week |
Perl |
Raku |
Blog |
344 |
47 | 25 | 17 |
345 |
49 | 22 | 15 |
346 |
50 | 18 | 15 |
347 |
47 | 21 | 24 |
348 |
47 | 19 | 24 |
Last 5 weeks guest contribution stats. Thank you each and every guest contributors for your time and efforts.
Week |
Guests |
Contributions |
Languages |
344 |
16 | 60 | 18 |
345 |
17 | 57 | 18 |
346 |
15 | 51 | 17 |
347 |
16 | 67 | 21 |
348 |
16 | 70 | 23 |
TOP 10 Guest Languages
Do you see your favourite language in the Top #10? If not then why not contribute regularly and make it to the top.
1. Python (3757)
2. Rust (1048)
3. Ruby (848)
4. Haskell (833)
5. Lua (796)
6. C++ (668)
7. JavaScript (600)
8. C (596)
9. Go (584)
10. BQN (485)
Blogs with Creative Title
1. Time Alike by Arne Sommer.
2. String Alike, Convert Time by Bob Lied.
3. The Times They Are a-Like by Jorg Sommrey.
4. splitting, counting and multiplying by Luca Ferrari.
5. Get Those Strings and Times Covered by Matthias Muth.
6. Ticking away the moments that make up a challenge… by Packy Anderson.
7. String time by Peter Campbell Smith.
8. Time for Strings by Roger Bell_West.
9. Alike Time by Simon Green.
GitHub Repository Stats
1. Commits: 46,394 (+98)
2. Pull Requests: 13,034 (+37)
3. Contributors: 265
4. Fork: 339
5. Stars: 200 (+1)
SPONSOR
With start of Week #268, we have a new sponsor Lance Wicks until the end of year 2025. Having said we are looking for more sponsors so that we can go back to weekly winner. If anyone interested please get in touch with us at perlweeklychallenge@yahoo.com. Thanks for your support in advance.
RECAP
Quick recap of The Weekly Challenge - 348 by Mohammad Sajid Anwar.
PERL REVIEW
If you missed any past reviews then please check out the collection.
RAKU REVIEW
If you missed any past reviews then please check out the collection.
CHART
Please take a look at the charts showing interesting data.
I would like to THANK every member of the team for their valuable suggestions. Please do share your experience with us.
NEW MEMBERS
Please find out How to contribute?, if you have any doubts.
Please try the excellent tool EZPWC created by respected member Saif Ahmed of Team PWC.
GUESTS
Please check out the guest contributions for the Week #348.
Please find past solutions by respected guests. Please share your creative solutions in other languages.
Task 1: Power String
Submitted by: Mohammad Sajid Anwar
You are given a string.
Write a script to return the power of the given string.
The power of the string is the maximum length of a non-empty substring that contains only one unique character.
Example 1
Input: $str = "textbook"
Output: 2
Breakdown: "t", "e", "x", "b", "oo", "k"
The longest substring with one unique character is "oo".
Example 2
Input: $str = "aaaaa"
Output: 5
Example 3
Input: $str = "hoorayyy"
Output: 3
Breakdown: "h", "oo", "r", "a", "yyy"
The longest substring with one unique character is "yyy".
Example 4
Input: $str = "x"
Output: 1
Example 5
Input: $str = "aabcccddeeffffghijjk"
Output: 4
Breakdown: "aa", "b", "ccc", "dd", "ee", "ffff", "g", "h", "i", "jj", "k"
The longest substring with one unique character is "ffff".
Task 2: Meeting Point
Submitted by: Mohammad Sajid Anwar
You are given instruction string made up of U (up), D (down), L (left) and R (right).
Write a script to return true if following the instruction, you meet the starting point (0,0).
Example 1
Input: $path = "ULD"
Output: false
(-1,1) <- (0,1)
| ^
v |
(-1,0) (0,0)
Example 2
Input: $path = "ULDR"
Output: true
(-1,1) <- (0,1)
| ^
v |
(-1,0) -> (0,0)
Example 3
Input: $path = "UUURRRDDD"
Output: false
(0,3) -> (1,3) -> (2,3) -> (3,3)
^ |
| v
(0,2) (3,2)
^ |
| v
(0,1) (3,1)
^ |
| v
(0,0) (3,0)
Example 4
Input: $path = "UURRRDDLLL"
Output: true
(0,2) -> (1,2) -> (2,2) -> (3,2)
^ |
| v
(0,1) (3,1)
^ |
| v
(0,0) <- (1,0) <- (1,1) <- (3,0)
Example 5
Input: $path = "RRUULLDDRRUU"
Output: true
(0,2) <- (1,2) <- (2,2)
| ^
v |
(0,1) (2,1)
| ^
v |
(0,0) -> (1,0) -> (2,1)
Last date to submit the solution 23:59 (UK Time) Sunday 30th November 2025.