From 15cf3dcafba78dda35d8ae22066cbc75141737d8 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sun, 5 May 2013 19:35:11 +0200 Subject: [PATCH] added operator % --- rpn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpn b/rpn index 70606be..268cc8f 100755 --- a/rpn +++ b/rpn @@ -10,7 +10,7 @@ my $stack_color = 'blue'; print color $input_color; while (<>) { for (split) { - if (m{^[-+*/]|\*\*$}) { + if (m{^[-+*/%]|\*\*$}) { my $y = pop @stack; my $x = pop @stack; my $z = eval "$x $_ $y";