aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-053/ruben-westerberg/README8
-rwxr-xr-xchallenge-053/ruben-westerberg/perl/ch-2.pl4
2 files changed, 7 insertions, 5 deletions
diff --git a/challenge-053/ruben-westerberg/README b/challenge-053/ruben-westerberg/README
index 84ce79a25d..37aacdf0d8 100644
--- a/challenge-053/ruben-westerberg/README
+++ b/challenge-053/ruben-westerberg/README
@@ -2,9 +2,11 @@ Solution by Ruben Westerberg
ch-1.pl and ch-1.raku
===================
-Stepping numbers
-Run the the program with two arguments between 100 and 999. Displays stepping numbers.
+Rotate matrix
+Run program to demonstrate rotating matrix by 90, 180 and 270 deg
+
ch-2.pl and ch-2.raku
===================
-Coin picking game. Use the < and > keys to select the end of the coin list. Plays against the computer. Most money wins
+Vowels
+Run the program with a single command line argument between 1 and 5 (default is 2). Program generates list of strings of this length from vowels and which abide by the specified rules.
diff --git a/challenge-053/ruben-westerberg/perl/ch-2.pl b/challenge-053/ruben-westerberg/perl/ch-2.pl
index 64f3dfa9ca..9aa0c3ba43 100755
--- a/challenge-053/ruben-westerberg/perl/ch-2.pl
+++ b/challenge-053/ruben-westerberg/perl/ch-2.pl
@@ -5,12 +5,12 @@ use List::Util;
use v5.26;
no warnings 'experimental';
-my $n=$ARGV[0]//5;
+my $n=$ARGV[0]//2;
my @vowels=qw<a e i o u>;
die "Number not in range 1..5\n" unless grep /$n/, 1..5;
-say join "",@$_ for grep {
+say for sort map {join "",@$_} grep {
my $sum=0;
my $s=join '', @$_;
given ($s) {