in reply to splitting a source file

I think you want to create your own Perl modules. Have you gone through this tutorial: Simple Module Tutorial?