summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillermo Ramos2019-05-30 22:17:56 +0200
committerGuillermo Ramos2019-05-30 22:18:03 +0200
commitcdd1b6a4c2f7407f5393a0dc88f35a126be96213 (patch)
tree3ed16fee89fd212ead81785b7608b95a7072246b
parent4493a71f62adec164d5184a2982cd568d72de5a4 (diff)
downloadperlweekly-cdd1b6a4c2f7407f5393a0dc88f35a126be96213.tar.gz
[010] Format
-rwxr-xr-x010/ch1.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/010/ch1.pl b/010/ch1.pl
index 645f71c..f2073ad 100755
--- a/010/ch1.pl
+++ b/010/ch1.pl
@@ -31,6 +31,7 @@ if ($ARGV[0] eq "--test") {
# roman -> arabic
sub decode {
my @roman = split //, shift;
+
# Decimal value of each roman symbol
my %dec = (
M => 1000,
@@ -65,6 +66,7 @@ sub encode {
die "ERROR: Unable to encode numbers bigger than 9999" if $_[0] > 9999;
my @arabic = split //, shift;
+
my @symbols = ("I", "V", "X", "L", "C", "D", "M");
my @roman; # Return value (roman symbols)