aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-050/yet-ebreo/perl/ch-2.pl15
1 files changed, 15 insertions, 0 deletions
diff --git a/challenge-050/yet-ebreo/perl/ch-2.pl b/challenge-050/yet-ebreo/perl/ch-2.pl
new file mode 100644
index 0000000000..b371280c49
--- /dev/null
+++ b/challenge-050/yet-ebreo/perl/ch-2.pl
@@ -0,0 +1,15 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use feature 'say';
+
+my @list = sort {$a - $b } split " ",$ARGV[0] || "2 6 1 3";
+
+for my $i (0..~-@list) {
+ say $list[$i] if ~-@list-$i == $list[$i]
+}
+=begin
+perl .\ch-2.pl "2 6 1 3"
+2
+=cut \ No newline at end of file