aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchallenge-246/jo-37/perl/ch-1.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/challenge-246/jo-37/perl/ch-1.pl b/challenge-246/jo-37/perl/ch-1.pl
new file mode 100755
index 0000000000..ba06467be3
--- /dev/null
+++ b/challenge-246/jo-37/perl/ch-1.pl
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+
+use v5.11;
+use warnings;
+
+
+### Input and Output
+
+srand time;
+say for sixoutoffortynine();
+
+
+### Implementation
+
+sub sixoutoffortynine {
+ my @pool = (1..49);
+ my @winning;
+ push @winning, splice @pool, rand @pool, 1 for 1 .. 6;
+ sort {$a <=> $b} @winning;
+}