summaryrefslogtreecommitdiffstats
path: root/Aufgabe6/RPN/lib
diff options
context:
space:
mode:
Diffstat (limited to 'Aufgabe6/RPN/lib')
-rw-r--r--Aufgabe6/RPN/lib/RPN.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Aufgabe6/RPN/lib/RPN.pm b/Aufgabe6/RPN/lib/RPN.pm
index 6e8f5b1..be5915d 100644
--- a/Aufgabe6/RPN/lib/RPN.pm
+++ b/Aufgabe6/RPN/lib/RPN.pm
@@ -3,7 +3,7 @@ package RPN;
use strict;
use warnings;
use Math::Trig;
-
+use Regexp::Common;
require Exporter;
our @ISA = qw(Exporter);
@@ -368,7 +368,7 @@ sub rpn {
}
else
{
- if ($operand =~ /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/)
+ if ($operand =~ /^$RE{"num"}{"real"}$/)
{
push (@stack, $operand);
}