aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-228/avery-adams/perl/ch-1.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-228/avery-adams/perl/ch-1.pl b/challenge-228/avery-adams/perl/ch-1.pl
new file mode 100644
index 0000000000..3bc8b9203a
--- /dev/null
+++ b/challenge-228/avery-adams/perl/ch-1.pl
@@ -0,0 +1,13 @@
+#$/usr/bin/perl
+
+use v5.36;
+
+my %ints;
+foreach (@ARGV) {
+ $ints{$_} = !defined($ints{$_});
+}
+my $total;
+foreach (keys %ints) {
+ $total += $_ if $ints{$_} == 1;
+}
+say $total //= 0;