Hacker News new | ask | show | jobs
by lojic 6842 days 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?

2 comments

Oh 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 :(
Yeah baby! I missed one true/false Ruby idiosyncracy, and that did the trick :)
Think "Forth", "RPN", that sort of thing. It got me for a while too.