in reply to Re: Surely @a is local to sub load?
in thread Surely @a is local to sub load?

Don't do that. As you mentioned, my @a unless @n; is officially undefined behaviour. Instead, use

{ my @a; sub load { push @a, @n; @a } }
or
use feature qw( state ); sub load { state $a = []; push @$a, @n; @$a }

Replies are listed 'Best First'.
Re^3: Surely @a is local to sub load?
by choroba (Cardinal) on Jun 27, 2016 at 19:15 UTC
    > Don't do that.

    That was my point. I should have made myself clearer.

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