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.

As $x can never be less than $x, you can turn each second if in each block into elsif (provided it has been covered).
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^3: John Guttag's book - 2nd exercise. My attempt in Perl.
by shmem (Chancellor) on May 21, 2017 at 12:13 UTC

    Sure, but the point was to unroll the loop. Ah, I see. Right. Fixed.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'