From ff35e22e2c49d58218f5d22e2b6507a3e1a73735 Mon Sep 17 00:00:00 2001 From: Sergiotarxz Date: Tue, 14 Nov 2023 12:36:43 +0100 Subject: [PATCH] Avoiding main call to get hidden behind subroutine declarations. --- number_generator.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/number_generator.pl b/number_generator.pl index bedc03d..a37e0e9 100644 --- a/number_generator.pl +++ b/number_generator.pl @@ -12,6 +12,8 @@ my @numbers_one_to_nineteen = (@numbers_one_to_nine, qw/ten eleven twelve thirte # This is contains an undef in the decenes index just to hopefully catch some warning if gets wrongfully used.) my @decenes = (undef, qw/twenty thirty forty fifty sixty seventy eighty ninety/); +main() + sub main { my $start_of_range = $ARGV[0]; my $end_of_range = $ARGV[1]; @@ -117,5 +119,3 @@ sub append_millions_to_return($number_ref, $return_ref) { ${$return_ref} .= $numbers_one_to_nine[$millions_unit-1] . ' ' . 'million'; ${$number_ref} = $number % 1_000_000; } - -main()