in reply to Re: understand and prevent 'Out of memory!' during sub recursion
in thread understand and prevent 'Out of memory!' during sub recursion

thanks choroba,

but why &inter if $_[0][0] does not act the same of your, working, &inter if grep @$_, @_ ?

Can you also expand a bit your last sentence?

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^3: understand and prevent 'Out of memory!' during sub recursion
by choroba (Cardinal) on Nov 09, 2017 at 11:15 UTC
    $_[0][0] only checks the first array, i.e. it fails if the first array is not the longest one. grep, on the other hand, checks all the arrays.

    ($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,