in reply to Re: John Guttag's book - 2nd exercise. My attempt in Perl.
in thread John Guttag's book - 2nd exercise. My attempt in Perl.

I guess the OP meant to say that you should not use things like sort, map, grep or List::Util. The code in the OP is using the modulo operator, so we should assume this is allowed.

Replies are listed 'Best First'.
Re^3: John Guttag's book - 2nd exercise. My attempt in Perl.
by shmem (Chancellor) on May 20, 2017 at 21:37 UTC
      I agree with you (and upvoted your posts), but, still, the OP is providing some of the information needed in the suggested code. We can use this information.