As a follow up to Finding the first 20 terms in the Fibonacci Series, next in the 3Monkey Golf series — Determining if a number is prime. The following is a fairly simple Perl one liner to do the trick. I’m interested in seeing implementations in other languages. I will be posting follow ups with the best submissions from both Golf challenges at the end of the week.
Character count = 36
Please note that use og characters such as > and < require escaping as & lt; and & gt;
If you have difficulty posting your solution please email me the solution at stacy (at) 3monkeyweb (period) com and I will make sure it gets posted.
Good luck, and until next time.