aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-190/kueppo-wesley/perl/ch-1.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/challenge-190/kueppo-wesley/perl/ch-1.pl b/challenge-190/kueppo-wesley/perl/ch-1.pl
new file mode 100644
index 0000000000..be3ec2abdc
--- /dev/null
+++ b/challenge-190/kueppo-wesley/perl/ch-1.pl
@@ -0,0 +1,14 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+sub capital {
+ return $_[ 0 ] =~ m/^ (?: [A-Z]?[a-z]+ | [A-Z]+ ) $/x ? 1 : 0;
+}
+
+is_deeply( [ map { capital( $_ ) } qw(Perl TPF PyThon raku) ], [ qw(1 1 0 1) ], "Appropiate usage of Capital letters?" );
+
+done_testing( 1 );