aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Sajid Anwar <mohammad.anwar@yahoo.com>2025-09-29 01:28:03 +0100
committerMohammad Sajid Anwar <mohammad.anwar@yahoo.com>2025-09-29 01:28:03 +0100
commite23b95e23dfb991834f7ff7e1b89c18dfb0454a2 (patch)
treeb4bd83529207e5729e02677a67213a4c9fc96956
parentbfc6dbe6c870544c43809c1c8cc442d418d47e23 (diff)
downloadperlweeklychallenge-club-e23b95e23dfb991834f7ff7e1b89c18dfb0454a2.tar.gz
perlweeklychallenge-club-e23b95e23dfb991834f7ff7e1b89c18dfb0454a2.tar.bz2
perlweeklychallenge-club-e23b95e23dfb991834f7ff7e1b89c18dfb0454a2.zip
- Added solutions by Ali Moradi.
-rw-r--r--challenge-340/deadmarshal/blog.txt1
-rw-r--r--challenge-340/deadmarshal/perl/ch-1.pl19
-rw-r--r--challenge-340/deadmarshal/perl/ch-2.pl21
-rw-r--r--stats/pwc-current.json21
-rw-r--r--stats/pwc-language-breakdown-2019.json2
-rw-r--r--stats/pwc-language-breakdown-2020.json2
-rw-r--r--stats/pwc-language-breakdown-2021.json2
-rw-r--r--stats/pwc-language-breakdown-2022.json2
-rw-r--r--stats/pwc-language-breakdown-2023.json2
-rw-r--r--stats/pwc-language-breakdown-2024.json2
-rw-r--r--stats/pwc-language-breakdown-2025.json8
-rw-r--r--stats/pwc-language-breakdown-summary.json6
-rw-r--r--stats/pwc-leaders.json36
-rw-r--r--stats/pwc-summary-1-30.json6
-rw-r--r--stats/pwc-summary-121-150.json2
-rw-r--r--stats/pwc-summary-151-180.json2
-rw-r--r--stats/pwc-summary-181-210.json2
-rw-r--r--stats/pwc-summary-211-240.json2
-rw-r--r--stats/pwc-summary-241-270.json2
-rw-r--r--stats/pwc-summary-271-300.json2
-rw-r--r--stats/pwc-summary-301-330.json2
-rw-r--r--stats/pwc-summary-31-60.json2
-rw-r--r--stats/pwc-summary-61-90.json2
-rw-r--r--stats/pwc-summary-91-120.json2
-rw-r--r--stats/pwc-summary.json6
-rw-r--r--stats/pwc-yearly-language-summary.json8
26 files changed, 112 insertions, 52 deletions
diff --git a/challenge-340/deadmarshal/blog.txt b/challenge-340/deadmarshal/blog.txt
new file mode 100644
index 0000000000..200c1283d3
--- /dev/null
+++ b/challenge-340/deadmarshal/blog.txt
@@ -0,0 +1 @@
+https://deadmarshal.blogspot.com/2025/09/twc340.html
diff --git a/challenge-340/deadmarshal/perl/ch-1.pl b/challenge-340/deadmarshal/perl/ch-1.pl
new file mode 100644
index 0000000000..bc592670ae
--- /dev/null
+++ b/challenge-340/deadmarshal/perl/ch-1.pl
@@ -0,0 +1,19 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+sub duplicate_removals{
+ my ($str) = @_;
+ while(1) {
+ my $c = 0;
+ $str =~ s/(.)\1//g and $c = 1;
+ last unless $c
+ }
+ $str
+}
+
+printf "%s\n",duplicate_removals('abbaca');
+printf "%s\n",duplicate_removals('azxxzy');
+printf "%s\n",duplicate_removals('aaaaaaaa');
+printf "%s\n",duplicate_removals('aabccba');
+printf "%s\n",duplicate_removals('abcddcba')
diff --git a/challenge-340/deadmarshal/perl/ch-2.pl b/challenge-340/deadmarshal/perl/ch-2.pl
new file mode 100644
index 0000000000..d318ff1687
--- /dev/null
+++ b/challenge-340/deadmarshal/perl/ch-2.pl
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+sub is_ascending{
+ foreach my $i(1..$#{$_[0]}) {
+ return 0 if $_[0]->[$i] <= $_[0]->[$i-1]
+ }
+ 1
+}
+
+sub ascending_numbers{
+ my @arr = grep {/\d+/} split /\s+/,$_[0];
+ is_ascending(\@arr)
+}
+
+printf "%d\n",ascending_numbers('The cat has 3 kittens 7 toys 10 beds');
+printf "%d\n",ascending_numbers('Alice bought 5 apples 2 oranges 9 bananas');
+printf "%d\n",ascending_numbers('I ran 1 mile 2 days 3 weeks 4 months');
+printf "%d\n",ascending_numbers('Bob has 10 cars 10 bikes');
+printf "%d\n",ascending_numbers('Zero is 0 one is 1 two is 2');
diff --git a/stats/pwc-current.json b/stats/pwc-current.json
index 91f702353d..5c756f5f95 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -9,6 +9,20 @@
[
"Perl",
2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Ali Moradi",
+ "name" : "Ali Moradi"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
]
],
"id" : "Andreas Mahnke",
@@ -385,6 +399,11 @@
"colorByPoint" : 1,
"data" : [
{
+ "drilldown" : "Ali Moradi",
+ "name" : "Ali Moradi",
+ "y" : 3
+ },
+ {
"drilldown" : "Andreas Mahnke",
"name" : "Andreas Mahnke",
"y" : 2
@@ -544,7 +563,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 31] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 32] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge - 340"
diff --git a/stats/pwc-language-breakdown-2019.json b/stats/pwc-language-breakdown-2019.json
index 8f68ee6467..263ab84291 100644
--- a/stats/pwc-language-breakdown-2019.json
+++ b/stats/pwc-language-breakdown-2019.json
@@ -970,7 +970,7 @@
}
],
"subtitle" : {
- "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge Language"
diff --git a/stats/pwc-language-breakdown-2020.json b/stats/pwc-language-breakdown-2020.json
index d25f89175f..4d0c9a07e7 100644
--- a/stats/pwc-language-breakdown-2020.json
+++ b/stats/pwc-language-breakdown-2020.json
@@ -1223,7 +1223,7 @@
}
],
"subtitle" : {
- "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge Language"
diff --git a/stats/pwc-language-breakdown-2021.json b/stats/pwc-language-breakdown-2021.json
index 71d62b1cc0..297d770a35 100644
--- a/stats/pwc-language-breakdown-2021.json
+++ b/stats/pwc-language-breakdown-2021.json
@@ -1223,7 +1223,7 @@
}
],
"subtitle" : {
- "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge Language"
diff --git a/stats/pwc-language-breakdown-2022.json b/stats/pwc-language-breakdown-2022.json
index 7f387b3455..ff30b6654e 100644
--- a/stats/pwc-language-breakdown-2022.json
+++ b/stats/pwc-language-breakdown-2022.json
@@ -1223,7 +1223,7 @@
}
],
"subtitle" : {
- "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge Language"
diff --git a/stats/pwc-language-breakdown-2023.json b/stats/pwc-language-breakdown-2023.json
index 3ea4d1b802..8f494ffa8c 100644
--- a/stats/pwc-language-breakdown-2023.json
+++ b/stats/pwc-language-breakdown-2023.json
@@ -1200,7 +1200,7 @@
}
],
"subtitle" : {
- "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge Language"
diff --git a/stats/pwc-language-breakdown-2024.json b/stats/pwc-language-breakdown-2024.json
index 22aa5c7710..e6c8557a83 100644
--- a/stats/pwc-language-breakdown-2024.json
+++ b/stats/pwc-language-breakdown-2024.json
@@ -1246,7 +1246,7 @@
}
],
"subtitle" : {
- "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge Language"
diff --git a/stats/pwc-language-breakdown-2025.json b/stats/pwc-language-breakdown-2025.json
index 8d6b876bfd..822b441481 100644
--- a/stats/pwc-language-breakdown-2025.json
+++ b/stats/pwc-language-breakdown-2025.json
@@ -8,7 +8,7 @@
"data" : [
[
"Perl",
- 45
+ 47
],
[
"Raku",
@@ -16,7 +16,7 @@
],
[
"Blog",
- 10
+ 11
]
],
"id" : "340",
@@ -709,7 +709,7 @@
{
"drilldown" : "340",
"name" : "340",
- "y" : 78
+ "y" : 81
},
{
"drilldown" : "339",
@@ -901,7 +901,7 @@
}
],
"subtitle" : {
- "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge Language"
diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json
index 3d52eda18d..c25a289368 100644
--- a/stats/pwc-language-breakdown-summary.json
+++ b/stats/pwc-language-breakdown-summary.json
@@ -10,7 +10,7 @@
"data" : [
[
"Perl",
- 17529
+ 17531
],
[
"Raku",
@@ -18,7 +18,7 @@
],
[
"Blog",
- 6282
+ 6283
]
],
"dataLabels" : {
@@ -37,7 +37,7 @@
}
],
"subtitle" : {
- "text" : "Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge Contributions [2019 - 2025]"
diff --git a/stats/pwc-leaders.json b/stats/pwc-leaders.json
index 687f3c9b50..19188445a2 100644
--- a/stats/pwc-leaders.json
+++ b/stats/pwc-leaders.json
@@ -345,18 +345,8 @@
{
"data" : [
[
- "Raku",
- 471
- ]
- ],
- "id" : "Jan Krnavek",
- "name" : "Jan Krnavek"
- },
- {
- "data" : [
- [
"Perl",
- 259
+ 261
],
[
"Raku",
@@ -364,7 +354,7 @@
],
[
"Blog",
- 94
+ 95
]
],
"id" : "Ali Moradi",
@@ -373,6 +363,16 @@
{
"data" : [
[
+ "Raku",
+ 471
+ ]
+ ],
+ "id" : "Jan Krnavek",
+ "name" : "Jan Krnavek"
+ },
+ {
+ "data" : [
+ [
"Perl",
184
],
@@ -900,14 +900,14 @@
"y" : 982
},
{
- "drilldown" : "Jan Krnavek",
- "name" : "22: Jan Krnavek",
+ "drilldown" : "Ali Moradi",
+ "name" : "22: Ali Moradi",
"y" : 942
},
{
- "drilldown" : "Ali Moradi",
- "name" : "23: Ali Moradi",
- "y" : 936
+ "drilldown" : "Jan Krnavek",
+ "name" : "23: Jan Krnavek",
+ "y" : 942
},
{
"drilldown" : "Packy Anderson",
@@ -1049,7 +1049,7 @@
}
],
"subtitle" : {
- "text" : "Click the columns to drilldown the score breakdown. Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "Click the columns to drilldown the score breakdown. Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "Team Leaders (TOP 50)"
diff --git a/stats/pwc-summary-1-30.json b/stats/pwc-summary-1-30.json
index 7489b37b06..7d264db4b3 100644
--- a/stats/pwc-summary-1-30.json
+++ b/stats/pwc-summary-1-30.json
@@ -24,7 +24,7 @@
2,
43,
93,
- 259,
+ 261,
44,
13,
8,
@@ -94,7 +94,7 @@
0,
0,
13,
- 94,
+ 95,
0,
32,
4,
@@ -115,7 +115,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 30] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 30] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-summary-121-150.json b/stats/pwc-summary-121-150.json
index 832b459ea8..ed434ce37d 100644
--- a/stats/pwc-summary-121-150.json
+++ b/stats/pwc-summary-121-150.json
@@ -115,7 +115,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 30] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 30] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-summary-151-180.json b/stats/pwc-summary-151-180.json
index 6cdf4add7a..c2876e0631 100644
--- a/stats/pwc-summary-151-180.json
+++ b/stats/pwc-summary-151-180.json
@@ -115,7 +115,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 30] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 30] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-summary-181-210.json b/stats/pwc-summary-181-210.json
index 8c4a9686cb..0ef49ce1bb 100644
--- a/stats/pwc-summary-181-210.json
+++ b/stats/pwc-summary-181-210.json
@@ -115,7 +115,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 30] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 30] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-summary-211-240.json b/stats/pwc-summary-211-240.json
index 6b4ada8e2d..f30197d4e2 100644
--- a/stats/pwc-summary-211-240.json
+++ b/stats/pwc-summary-211-240.json
@@ -115,7 +115,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 30] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 30] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-summary-241-270.json b/stats/pwc-summary-241-270.json
index 60f9f51363..725c457718 100644
--- a/stats/pwc-summary-241-270.json
+++ b/stats/pwc-summary-241-270.json
@@ -115,7 +115,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 30] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 30] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-summary-271-300.json b/stats/pwc-summary-271-300.json
index e22fe4256c..2132a963e4 100644
--- a/stats/pwc-summary-271-300.json
+++ b/stats/pwc-summary-271-300.json
@@ -115,7 +115,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 30] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 30] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-summary-301-330.json b/stats/pwc-summary-301-330.json
index e19e39001a..dcc8116ab4 100644
--- a/stats/pwc-summary-301-330.json
+++ b/stats/pwc-summary-301-330.json
@@ -109,7 +109,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 28] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 28] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-summary-31-60.json b/stats/pwc-summary-31-60.json
index 9bb4ff5f0f..95cb5f080b 100644
--- a/stats/pwc-summary-31-60.json
+++ b/stats/pwc-summary-31-60.json
@@ -115,7 +115,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 30] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 30] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-summary-61-90.json b/stats/pwc-summary-61-90.json
index e579b0023c..b4e35d699e 100644
--- a/stats/pwc-summary-61-90.json
+++ b/stats/pwc-summary-61-90.json
@@ -115,7 +115,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 30] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 30] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-summary-91-120.json b/stats/pwc-summary-91-120.json
index d93c4b6876..16baf0ff99 100644
--- a/stats/pwc-summary-91-120.json
+++ b/stats/pwc-summary-91-120.json
@@ -115,7 +115,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 30] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 30] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-summary.json b/stats/pwc-summary.json
index c232644a30..14ae95dedf 100644
--- a/stats/pwc-summary.json
+++ b/stats/pwc-summary.json
@@ -24,7 +24,7 @@
1,
24,
48,
- 130,
+ 131,
26,
9,
4,
@@ -690,7 +690,7 @@
0,
0,
7,
- 94,
+ 95,
0,
23,
4,
@@ -1009,7 +1009,7 @@
}
],
"subtitle" : {
- "text" : "[Champions: 328] Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "[Champions: 328] Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge [2019 - 2025]"
diff --git a/stats/pwc-yearly-language-summary.json b/stats/pwc-yearly-language-summary.json
index b967e9adf1..8e3f202c0f 100644
--- a/stats/pwc-yearly-language-summary.json
+++ b/stats/pwc-yearly-language-summary.json
@@ -8,7 +8,7 @@
"data" : [
[
"Perl",
- 1758
+ 1760
],
[
"Raku",
@@ -16,7 +16,7 @@
],
[
"Blog",
- 695
+ 696
]
],
"id" : "2025",
@@ -151,7 +151,7 @@
{
"drilldown" : "2025",
"name" : "2025",
- "y" : 3324
+ "y" : 3327
},
{
"drilldown" : "2024",
@@ -188,7 +188,7 @@
}
],
"subtitle" : {
- "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:15:48 GMT"
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-09-29 00:27:48 GMT"
},
"title" : {
"text" : "The Weekly Challenge Language"