in reply to
Re: Tales from writing a RPN evaluator in Perl 5, Perl 6 and Haskell
in thread Tales from writing a RPN evaluator in Perl 5, Perl 6 and Haskell
You are right. My intent was to use /^-?\d+$/ but somehow I "forgot" to insert the anchors. :-( Curiously, when emulating the regex in hand-rolled Haskell code, I somehow "remembered" to insert the anchors. :-) I've updated the Perl code in the root node by inserting the anchors. The Haskell isStrDigit function already checks for all digits (equivalent to using the anchors) and so does not require update. Thanks ambrus.