Thanks, moritz, for the reply...
But I'm looking for something different.
In your example, main is a package and access a variable declared in package B.
In my problem, main is not a package but a script and it *uses* B. And I want B to access a variable declared in main without passing it as a argument in a subroutine call.