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

Yeah, KurtZ, I definitely agree with you that it can be made simpler (++), and I most likely wouldn't code this the way I have shown.

I only suggested a solution that used only very basic Perl knowledge since it was what the OP was asking for. Also, having two loops did not bother me too much, since they're browsing the array items only once anyway.

  • Comment on Re^3: John Guttag's book - 2nd exercise. My attempt in Perl.