From bd8921a241de74db318cd640c340214b9345d722 Mon Sep 17 00:00:00 2001 From: Sergiotarxz Date: Tue, 14 Nov 2023 12:31:42 +0100 Subject: [PATCH] Adding comment. --- number_generator.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/number_generator.pl b/number_generator.pl index 7f2b4a1..b706fe4 100644 --- a/number_generator.pl +++ b/number_generator.pl @@ -61,6 +61,8 @@ sub append_decene($number_ref, $return_ref) { sub append_decene_thousands($number_ref, $return_ref, $there_is_hundred_thousands) { my $number = ${$number_ref}; my $thousand_decene_unit = int ($number / 1_000); + # This is needed for numbers such as 1_100_001 that do not have thousand decenes + # but have thousand hundreds. if ($there_is_hundred_thousands && $thousand_decene_unit < 1) { ${$return_ref} .= ' thousand'; };