in reply to Re: Static variables (and also Perl 6)
in thread Static variables (and also Perl 6)
but what's so wrong about the closures we're using right now? ({ my $foo = 3; sub { ... } })
What's wrong with them indeed? I've seen several references above to needing the my's allocating behavor to be BEGIN{}ed, but I don't see the reasoning behind it. I've used this behavor fairly often when I want an iterator expressed as a counting and a reset function.
TACCTGTTTGAGTGTAACAATCATTCGCTCGGTGTATCCATCTTTG ACACAATGAATCTTTGACTCGAACAATCGTTCGGTCGCTCCGACGC
|
|---|