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.
In reply to Re^3: John Guttag's book - 2nd exercise. My attempt in Perl.
by Laurent_R
in thread John Guttag's book - 2nd exercise. My attempt in Perl.
by pritesh_ugrankar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |