aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchallenge-083/daniel-mita/perl/ch-1.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/challenge-083/daniel-mita/perl/ch-1.pl b/challenge-083/daniel-mita/perl/ch-1.pl
new file mode 100755
index 0000000000..cbcd67d7e5
--- /dev/null
+++ b/challenge-083/daniel-mita/perl/ch-1.pl
@@ -0,0 +1,14 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use feature qw<say>;
+
+my @words = split( /\s+/, $ARGV[0] // '' );
+if ( @words >= 3 ) {
+ say scalar( split( //, join( '', @words[ 1 .. $#words - 1 ] ) ) );
+}
+else {
+ say 'Fewer than 3 words given.';
+ exit 1;
+}