in reply to Re: Re: Re: Scope and Context
in thread Scope and Context

If you're never going to call the sub from outside the BEGIN block then maybe something like:
BEGIN { my $get_regexes = sub { ... return map {...} }; ... }
Which has the advantage of keeping the subroutine private.

Oh yes, don't forget that in recent perl you can do open my $fh, ..., which is far nicer than

local *FH; open FH, ...