in reply to help with scoping (code), part 2

When I want a static like that I do:
{ my $bar; sub foo { ... } }
This creates foo local to a block including just foo and bar.

HTH, --traveler

update: fix tiny typo