aboutsummaryrefslogtreecommitdiff
path: root/challenge-263/james-smith/perl/ch-1.pl
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-263/james-smith/perl/ch-1.pl')
-rw-r--r--challenge-263/james-smith/perl/ch-1.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/challenge-263/james-smith/perl/ch-1.pl b/challenge-263/james-smith/perl/ch-1.pl
new file mode 100644
index 0000000000..7534c1232c
--- /dev/null
+++ b/challenge-263/james-smith/perl/ch-1.pl
@@ -0,0 +1,5 @@
+sub target_index {
+ my( $k, @c ) = ( pop, 0, 0, 0 );
+ $c[ $_ <=> $k ]++ for @_;
+ $c[2] .. $c[2] + $c[0] - 1
+}