aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaldhar H. Vyas <jaldhar@braincells.com>2025-06-22 13:28:58 -0400
committerJaldhar H. Vyas <jaldhar@braincells.com>2025-06-22 13:37:08 -0400
commit547264633e7a6a6258f1e5a4c2e53c25b78ecd82 (patch)
treeb44afd5cd618fc57fcefa1339e0ed2936ea404fd
parentb557785d9a4c0e1a40f2f63a5e08e7eeb64c0cc4 (diff)
downloadperlweeklychallenge-club-547264633e7a6a6258f1e5a4c2e53c25b78ecd82.tar.gz
perlweeklychallenge-club-547264633e7a6a6258f1e5a4c2e53c25b78ecd82.tar.bz2
perlweeklychallenge-club-547264633e7a6a6258f1e5a4c2e53c25b78ecd82.zip
Revised answer for Challenge 326 task 2 by Jaldhar H. Vyas.
-rwxr-xr-xchallenge-326/jaldhar-h-vyas/perl/ch-2.pl2
-rwxr-xr-xchallenge-326/jaldhar-h-vyas/raku/ch-2.raku2
2 files changed, 2 insertions, 2 deletions
diff --git a/challenge-326/jaldhar-h-vyas/perl/ch-2.pl b/challenge-326/jaldhar-h-vyas/perl/ch-2.pl
index 712037a49b..7e2afe0c3a 100755
--- a/challenge-326/jaldhar-h-vyas/perl/ch-2.pl
+++ b/challenge-326/jaldhar-h-vyas/perl/ch-2.pl
@@ -6,7 +6,7 @@ my @ints = @ARGV;
my @decompressed;
while (my ($i, $j) = splice @ints, 0, 2) {
- push @decompressed, split //, $j x $i;
+ push @decompressed, ($j) x $i;
}
say q{(}, (join q{, }, @decompressed), q{)};
diff --git a/challenge-326/jaldhar-h-vyas/raku/ch-2.raku b/challenge-326/jaldhar-h-vyas/raku/ch-2.raku
index 81e0375d58..da78a60f08 100755
--- a/challenge-326/jaldhar-h-vyas/raku/ch-2.raku
+++ b/challenge-326/jaldhar-h-vyas/raku/ch-2.raku
@@ -7,7 +7,7 @@ sub MAIN(
while @ints.elems {
my ($i, $j) = @ints.splice(0, 2);
- @decompressed.push(| ($j x $i).comb);
+ @decompressed.push(| ($j xx $i));
}
say q{(}, @decompressed.join(q{, }), q{)};