in reply to How to include a file which is in a shared folder?

The fact that it is in a shared folder is of no consequence. As long as the folder is in @INC, shared or otherwise, Perl will look for the module there. Two convenient ways of modifying @INC is through env var PERL5LIB (see perlrun) and via module lib.
use lib '\\\\server1\\doc'; or use lib '//server1/doc'; use test;

If you're going to use use, make sure test.pm starts with package test;. Also make sure to use the same capitalisation for the name in both the use and package statements.