in reply to dynamiclly assigning values to global variables in modules
If I understand correctly, you really want to define a directory where your module is going to do some work (e.g. read or write some files), defined by the calling process. You could define your environment variable in the shell script calling your Perl program (this is assuming a Unix environment, but there are equivalent environment vars in other operating systrems). Another way is to have in your module an init procedure that will set a lexical global variable; this variable can then act as a closure variable that can be used by other subroutines in your module.