diff options
| -rw-r--r-- | challenge-047/user-person/perl/ch-1.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/challenge-047/user-person/perl/ch-1.pl b/challenge-047/user-person/perl/ch-1.pl index 6dc09d1bfb..ec2e27b494 100644 --- a/challenge-047/user-person/perl/ch-1.pl +++ b/challenge-047/user-person/perl/ch-1.pl @@ -43,7 +43,9 @@ print STDERR "Calculation result had a decimal $decimal that was truncated.\n" i if ( $result == 0) { print "N (no formal zero)\n"; # https://en.wikipedia.org/wiki/Roman_numerals#Zero } elsif ($result > 3_999) { - die "Calculation result $result , exceeds MMMCMXCIX (3,999) the maximum value of the Roman number format.\n"; + die "Calculation result $result exceeds MMMCMXCIX (3,999) the maximum value of the Roman number format.\n"; +} elsif ($result < 0) { + die "Calculation result $result is negative. Roman numbers are positive integers.\n"; } else { $result = Roman(int $result); print "$result\n"; |
