in reply to Re: Scope Between global and myin thread Scope Between global and my
In this case, just use a 'package' lexical:
package Foo; my $data; sub foo { ... } sub bar { ... } 1; [download]