diff options
author | P. J. McDermott <pj@pehjota.net> | 2017-01-17 14:30:10 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2017-01-17 14:30:10 (EST) |
commit | dc7128145b3301c83cd890069a7fc5de9f484bd2 (patch) | |
tree | bd1b4849e7ac9cc503cf9c91f62694e25e055c4d | |
parent | b3188cafd15481990ac6ce2ebfb6ff1868efaf97 (diff) | |
download | Math-Decimal-FastPP-dc7128145b3301c83cd890069a7fc5de9f484bd2.zip Math-Decimal-FastPP-dc7128145b3301c83cd890069a7fc5de9f484bd2.tar.gz Math-Decimal-FastPP-dc7128145b3301c83cd890069a7fc5de9f484bd2.tar.bz2 |
dadd(), dmul(): Don't use stringy split()
-rw-r--r-- | lib/Math/Decimal/FastPP.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Math/Decimal/FastPP.pm b/lib/Math/Decimal/FastPP.pm index 7de353b..badca0f 100644 --- a/lib/Math/Decimal/FastPP.pm +++ b/lib/Math/Decimal/FastPP.pm @@ -94,8 +94,8 @@ Adds C<$a> and C<$b> and returns their sum. sub dadd { - my ($ai, $af) = split("\\.", $_[0]); - my ($bi, $bf) = split("\\.", $_[1]); + my ($ai, $af) = split(/\./, $_[0]); + my ($bi, $bf) = split(/\./, $_[1]); $af ||= ""; $bf ||= ""; my $ae = length($af); @@ -131,8 +131,8 @@ Multiplies C<$a> and C<$b> and returns their product. sub dmul { - my ($ai, $af) = split("\\.", $_[0]); - my ($bi, $bf) = split("\\.", $_[1]); + my ($ai, $af) = split(/\./, $_[0]); + my ($bi, $bf) = split(/\./, $_[1]); $af ||= ""; $bf ||= ""; my $as = $ai . $af; |