aboutsummaryrefslogtreecommitdiff
path: root/challenge-008
diff options
context:
space:
mode:
authorPaulo Custodio <pauloscustodio@gmail.com>2021-01-26 23:31:20 +0000
committerPaulo Custodio <pauloscustodio@gmail.com>2021-01-26 23:31:20 +0000
commit8f7f5c93def45398db496f35e7921cfe0d264d1d (patch)
tree7f141de93b08d38f0e5fc5930ec93fc4ef311638 /challenge-008
parent8902910406fe11ec55932be70d1df508f61c083d (diff)
downloadperlweeklychallenge-club-8f7f5c93def45398db496f35e7921cfe0d264d1d.tar.gz
perlweeklychallenge-club-8f7f5c93def45398db496f35e7921cfe0d264d1d.tar.bz2
perlweeklychallenge-club-8f7f5c93def45398db496f35e7921cfe0d264d1d.zip
Remove List::Util and Data::Dump dependencies
Diffstat (limited to 'challenge-008')
-rw-r--r--challenge-008/paulo-custodio/perl/ch-2.pl10
1 files changed, 9 insertions, 1 deletions
diff --git a/challenge-008/paulo-custodio/perl/ch-2.pl b/challenge-008/paulo-custodio/perl/ch-2.pl
index afea2cc1f9..39d44bd75a 100644
--- a/challenge-008/paulo-custodio/perl/ch-2.pl
+++ b/challenge-008/paulo-custodio/perl/ch-2.pl
@@ -11,7 +11,6 @@
use strict;
use warnings;
use 5.030;
-use List::Util 'max';
sub center {
my(@lines) = @_;
@@ -20,5 +19,14 @@ sub center {
return @lines;
}
+sub max {
+ my($max, @a) = @_;
+ for (@a) {
+ $max = $_ if $max < $_;
+ }
+ return $max;
+}
+
+
my @lines = center(@ARGV);
say join "\n", @lines;