in reply to Perl module problem
In addition to the errors and debugging tips the others have pointed out, you should know that use is equivalent to BEGIN { require 'Module X' } which means that no matter where your use statement occurs, it will be executed during compilation of your module. It belongs therefore at the top of the file, and not inside of this subroutine.
Also, how do you mean to call these subroutines? Like MyPackage::MySub or MyPackage->MySub? If it's the latter then you'll need to fetch the package name from @_ and you should just drop the prototypes since they'll be ignored.
"The dead do not recognize context" -- Kai, Lexx
In Section
Seekers of Perl Wisdom