You can use the "lib" pragma to use modules in your
perl script. I just expalined how to do this on another forum, let me copy and paste that reply here....
If it is not a module with lots of dependencies (although you can still do it this way if it is) you use the "lib" pragma to include your own module directories into perls @INC array. Say you have a module named Foo::Bar.
Foo is the directory the module is stored in and the module is named Bar.pm. You can create a Foo directory in any folder on your website, but best to use one that is not www accessible. People often name it mymodules or cpanmodules. In that folder you duplicate the modules structure, so you create a folder named Foo in mymodules folder and place Bar.pm in the Foo folder. Then in your
perl script:
use lib qw(path/to/mymodules);
use Foo::Bar;