summaryrefslogtreecommitdiff
path: root/008
diff options
context:
space:
mode:
authorGuillermo Ramos2019-07-01 13:53:37 +0200
committerGuillermo Ramos2019-07-01 13:53:37 +0200
commitd916ca90c354b29cc1b0953508e9601576a4fd1e (patch)
treef1997d85fb0736cfb0abdf4cb534f81df8220df3 /008
parent85d335507fbb74df316bd5831e621e1a37884c35 (diff)
downloadperlweekly-d916ca90c354b29cc1b0953508e9601576a4fd1e.tar.gz
[all] Formatting, missing comments in header, etc
Diffstat (limited to '008')
-rwxr-xr-x008/ch1.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/008/ch1.pl b/008/ch1.pl
index 81d590c..bbd1893 100755
--- a/008/ch1.pl
+++ b/008/ch1.pl
@@ -1,10 +1,14 @@
#!/usr/bin/env perl
+#
+# Write a script that computes the first five perfect numbers. A perfect number
+# is an integer that is the sum of its positive proper divisors (all divisors
+# except itself).
+# (https://en.wikipedia.org/wiki/Perfect_number)
+################################################################################
use strict;
use warnings;
-my @primes;
-
sub perfect {
my $sum = 0;
my $n = shift;