5 ms·
Looks pretty close to Ruby: 1) remove semi-colons 2) replace a = b - - with a = b followed by b -= 1 3) while (z) { .. } with while (z) ... end However the if
by lojic 19y ago
Looks pretty close to Ruby:
1) remove semi-colons
2) replace a = b - - with a = b followed by b -= 1
3) while (z) { .. } with while (z) ... end
However the if modifier (if it works as in Ruby) doesn't work out very well. I haven't touched Perl in 9 years, so I don't know how different the operator precedence is if at all.
What's the deal with the if? Is it a regular modifier?
- lojic 19y agoOh yeah, Ruby has a slightly different interpretation of true/false, so I changed while(z) to while (z != 0) - likewise with if. No help though :(
- lojic 19y agoYeah baby! I missed one true/false Ruby idiosyncracy, and that did the trick :)
- benhoyt 19y agoThink "Forth", "RPN", that sort of thing. It got me for a while too.