Perl: the Markov chain saw | |
PerlMonks |
Re^2: Tales from writing a RPN evaluator in Perl 5, Perl 6 and Haskellby eyepopslikeamosquito (Archbishop) |
on Jan 05, 2006 at 02:36 UTC ( [id://521085]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Meditations
|
|