From 78c4b3edb3294a781653d9ff67126b20add144a9 Mon Sep 17 00:00:00 2001 From: Walt Mankowski Date: Mon, 28 Sep 2020 19:50:13 -0400 Subject: changed variable names to match description --- challenge-080/walt-mankowski/perl/ch-1.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/challenge-080/walt-mankowski/perl/ch-1.pl b/challenge-080/walt-mankowski/perl/ch-1.pl index fd08ac491f..dd356e9bee 100644 --- a/challenge-080/walt-mankowski/perl/ch-1.pl +++ b/challenge-080/walt-mankowski/perl/ch-1.pl @@ -11,14 +11,14 @@ use experimental qw(signatures); # # Write a script to find out the smallest positive number missing. -my %h = map { $_ => 1 } @ARGV; +my %n = map { $_ => 1 } @ARGV; -my $n = 1; +my $i = 1; while (1) { - if (defined $h{$n}) { - $n++; + if (defined $n{$i}) { + $i++; } else { - say $n; + say $i; last; } } -- cgit