In a message dated 1/21/2003 2:47:44 PM Eastern Standard Time, [EMAIL PROTECTED] writes:
> How do I split the big file up into smaller bits - ex. One sub function > per file? (How too do it isn't a problem) but how do I tell the main > function how to find the files where the sub function is located? > > Next question should I cal the files xxx.pl or xxx.inc or xxx.? > > And Finally should each file begin with the #!usr/bin/perl or isn't > that necessary?? > > I hope that someone can give me an answer - I tried have tried to find > the answer on perl.org / perdoc.org but without any success. > > First off, it's pretty easy. Most people name it .pl, for Perl Library, or .lib, but it doesn't matter. You don't need the path to perl, all you need is this line at the bottom of the file: 1; This returns a true value. This will open the subroutines from your program: require '/path/to/file.pl'; You can do a complete path, or a relative path will work. Now, you can call the subroutines that were in the file. "perldoc -f require" should tell you more.