See Making Perl Reusable with Modules (perl.com article) and perlmod for more.
In reply to Re: Connecting two scripts by andreas1234567 in thread Connecting two scripts by madox