On Sun, 4 Jan 2004, r huber wrote:

> I am writing several subroutines that I want to make
> available to other programs without directly including
> the code in those programs. Can anyone explain how to
> do this or where to go to find out how to do it.

Just make a file "mylibrary.pl" or what ever

Put the common subroutines in it

In you main program, add the line

require "/some/where/mylibrary.pl";

Notes:
1. mylibrary.pl can be called anything you like and doesn't need a .pl
extension
2. mylibrary.pl does not require a #! line, just place your subroutines in
there as though they were in you main program
3. It is suggested you use local variables in your library.


Owen


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to