http://www.perlmonks.org?node_id=1063365


in reply to How to share a group of functions with multiple main processes?

How do you run your two perl scripts? If it was indeed impossible for multiple scripts to use (well, require in your case) the same module at the same time, that issue would have been raised long ago.

I recommend you read Perl Modules. To make it short, if PrintVar.pm (something that is not a standalone Perl script but should be included, ie a module should have the .pm extension) is in the same folder as your script, to include it you just have to write: use PrintVar. And if it is in Something, use Something::Printvar;. This would allow you to move all your files at once without having to change every include path. You should still read Perl Modules if you want to make "good" Perl modules, to learn about packages (namespaces) and exporting.