The Weekly Challenge - 363

Monday, Mar 2, 2026| Tags: Perl, Raku

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: String Lie Detector

10. TASK #2: Subnet Sheriff


HEADLINES


Welcome to the Week #363 of The Weekly Challenge.

Welcome aboard, Spagett-del, and thank you for the first contributions in Raku.

Welcome aboard, Andrii Mishchenko, and thank you for the first contributions in Perl and Ruby.

Welcome back, Joelle Maslak. It’s always a pleasure to have you back in action. Thank you for the contributions in Perl and Lisp.

Thank you, Paulo Custodio and Lubos Kolouch for tackling past challenges. Your efforts have shifted the numbers significantly, especially with contributions in C language.

Thank you, Kjetil Skotheim, for working on missed challenges - it has clearly made a difference. Thanks to you, we now have two weeks in 2026 that have reached the target.

Speaking of guest contributions, Java, is about to take the 10th place, as it now shares the same number of contributions as BQN. So, all Java and BQN contributors, make sure your favourite language stays in the TOP 10. So much fun - I’m really enjoying it.



Below is my contributions to the Task #1 of Week #362.

Perl: source code

sub echo_chamber {
    my $str = shift;
    $str =~ s/(.)/ $1 x (pos($str) + 1) /ge;
    return $str;
}

Raku: source code

sub echo-chamber($str) {
    $str.subst: :g, /(.)/, { $0 x ($/.from + 1) };
}

Python: source code

def echo_chamber(s):
    result = ""
    for i, char in enumerate(s):
        result += char * (i + 1)
    return result

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   
   358       55       23       27   
   359       54       20       21   
   360       57       19       17   
   361       55       25       16   
   362       52       25       19   

Last 5 weeks guest contribution stats. Thank you each and every guest contributors for your time and efforts.

  Week      Guests       Contributions       Languages   
   358       18       71       20   
   359       18       68       23   
   360       16       73       22   
   361       13       53       20   
   362       17       68       22   

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     (4180)
 2. Rust       (1111)
 3. Ruby       (873)
 4. Haskell    (869)
 5. Lua        (850)
 6. C          (769)
 7. C++        (696)
 8. Go         (648)
 9. JavaScript (624)
10. BQN        (508)

Blogs with Creative Title


1. Spellbound Echo by Arne Sommer.

2. Lingua to the rescue! by Luca Ferrari.

3. What Sort of Echo? by Marc Perry.

4. You Have No Choice by Packy Anderson.

5. Echo and wordy numbers by Peter Campbell Smith.

6. Spellbound Echo by Roger Bell_West.

7. The one liners by Simon Green.


GitHub Repository Stats


1. Commits: 48,131 (+44)

2. Pull Requests: 13,633 (+27)

3. Contributors: 275 (+1)

4. Fork: 349 (+2)

5. Stars: 210



We are looking for sponsor for monthly prize pot of US $50. 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 - 362 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


Spagett-del, an expert Raku hacker joined Team PWC.

Andrii Mishchenko, an expert Perl hacker joined Team PWC.

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 #362.

Please find past solutions by respected guests. Please share your creative solutions in other languages.


Task 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: $str = "aa — two vowels and zero consonants"
Output: true

Example 2

Input: $str = "iv — one vowel and one consonant"
Output: true

Example 3

Input: $str = "hello - three vowels and two consonants"
Output: false

Example 4

Input: $str = "aeiou — five vowels and zero consonants"
Output: true

Example 5

Input: $str = "aei — three vowels and zero consonants"
Output: true

Task 2: Subnet Sheriff

Submitted by: Peter Campbell Smith

You are given an IPv4 address and an IPv4 network (in CIDR format).

Write a script to determine whether both are valid and the address falls within the network. For more information see the Wikipedia article.

Example 1

Input: $ip_addr = "192.168.1.45"
       $domain  = "192.168.1.0/24"
Output: true

Example 2

Input: $ip_addr = "10.0.0.256"
       $domain  = "10.0.0.0/24"
Output: false

Example 3

Input: $ip_addr = "172.16.8.9"
       $domain  = "172.16.8.9/32"
Output: true

Example 4

Input: $ip_addr = "172.16.4.5"
       $domain  = "172.16.0.0/14"
Output: true

Example 5

Input: $ip_addr = "192.0.2.0"
       $domain  = "192.0.2.0/25"
Output: true


Last date to submit the solution 23:59 (UK Time) Sunday 8th March 2026.


SO WHAT DO YOU THINK ?

If you have any suggestions or ideas then please do share with us.

Contact with me