From bec2e819618a9038e28bd0106a0c5a0da81796a8 Mon Sep 17 00:00:00 2001 From: Matthew Neleigh Date: Sun, 13 Feb 2022 18:42:56 -0500 Subject: modified: challenge-151/mattneleigh/perl/ch-2.pl --- challenge-151/mattneleigh/perl/ch-2.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-151/mattneleigh/perl/ch-2.pl b/challenge-151/mattneleigh/perl/ch-2.pl index 6a94d054bf..59a78cbc57 100755 --- a/challenge-151/mattneleigh/perl/ch-2.pl +++ b/challenge-151/mattneleigh/perl/ch-2.pl @@ -91,7 +91,7 @@ sub calculate_loot_yield_on_street{ $loot[1] = max($ARG[0], $ARG[1]); for($i = 2; $i < scalar(@ARG); $i++){ - $loot[$i] = max(@ARG[$i] + $loot[$i - 2], $loot[$i - 1]); + $loot[$i] = max($ARG[$i] + $loot[$i - 2], $loot[$i - 1]); } return($loot_initial + $loot[$#loot]); -- cgit