in reply to lib pragma problem

use lib 'mainfolder\modulesfolder'; is a relative path (relative to the path of your program). You should avoid that and specify a full path instead:

use lib "/full/path/to/the/library";

citromatik