diff options
| -rw-r--r-- | challenge-195/james-smith/perl/ch-1.pl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/challenge-195/james-smith/perl/ch-1.pl b/challenge-195/james-smith/perl/ch-1.pl new file mode 100644 index 0000000000..9b683e5c35 --- /dev/null +++ b/challenge-195/james-smith/perl/ch-1.pl @@ -0,0 +1,18 @@ +#!/usr/local/bin/perl + +use strict; +use warnings; +use feature qw(say); +use Test::More; +use Benchmark qw(cmpthese timethis); + +my @TESTS = ( + [15,14], [35,32] +); + +is( special( $_->[0] ), $_->[1] ) for @TESTS; +done_testing(); + +sub special { + scalar grep { !m{(\d).*\1} } 1..pop +} |
