aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <mohammad.anwar@yahoo.com>2019-07-18 13:05:28 +0100
committerMohammad S Anwar <mohammad.anwar@yahoo.com>2019-07-18 13:05:28 +0100
commit59ffbb868c2cddcddad79821fd7204526017cd26 (patch)
treec7066435cf0d112b6fd4724328d3d3f21de7437d
parent5359ed04a87b9c096d0779dc793779b1f37e90af (diff)
parent0eda9bda8ab17c91210e4808d214ad116c60100a (diff)
downloadperlweeklychallenge-club-59ffbb868c2cddcddad79821fd7204526017cd26.tar.gz
perlweeklychallenge-club-59ffbb868c2cddcddad79821fd7204526017cd26.tar.bz2
perlweeklychallenge-club-59ffbb868c2cddcddad79821fd7204526017cd26.zip
Merge branch 'master' of https://github.com/manwar/perlweeklychallenge-club
-rw-r--r--challenge-010/andrezgz/perl5/ch-1.pl16
1 files changed, 8 insertions, 8 deletions
diff --git a/challenge-010/andrezgz/perl5/ch-1.pl b/challenge-010/andrezgz/perl5/ch-1.pl
index beed25baaf..a1cfa3ca7d 100644
--- a/challenge-010/andrezgz/perl5/ch-1.pl
+++ b/challenge-010/andrezgz/perl5/ch-1.pl
@@ -44,14 +44,14 @@ exit 0;
# Subtractive notation roman number validation
sub _is_valid_roman {
- return $arg =~ /
- ^ # String start
- M{0,3} # Matching from 1000 to 3000
- (?:CM|CD|D|D?C{0,3})? # Matching from 100 to 900
- (?:XC|XL|L|L?X{0,3})? # Matching from 10 to 90
- (?:IX|IV|V|V?I{0,3})? # Matching from 1 to 9
- $ # String end
- /xi;
+ return $_[0] =~ /
+ ^ # String start
+ M{0,3} # Matching from 1000 to 3000
+ (?:CM|CD|D|D?C{0,3})? # Matching from 100 to 900
+ (?:XC|XL|L|L?X{0,3})? # Matching from 10 to 90
+ (?:IX|IV|V|V?I{0,3})? # Matching from 1 to 9
+ $ # String end
+ /xi;
}
sub encode_roman {