On 4/27/00 at 11:08 AM, norton@tweney.com (Vic Norton) wrote: > Hi, > > I have just started using MacPerl. I have written three longish > scripts for generating web pages for an HTML database from a tab > delimited text file (from an Excel spreadsheet). Right now I can > generate the web pages from BBEdit by "running" three files in > succession, one after the other. For your curiosity the files are > named "createNameList.pl", "createAddrPages.pl", "createNamePages.pl". > > I would like to have a single, small file, "createDB.pl", that would > set a couple of essential parameters - the location of original text > file and the path to the web page directory where the constructed web > pages will be stored - and then "run" the three files above in > succession. > > I can't figure out how to this. I'd like to write something like > run $filehandle1; > run $filehandle2; > run $filehandle3; > but I can't figure out the correct command. Also, whatever I do, I > will ultimately have to port it to a PC implementation of Perl. > > Any advice would be much appreciated. > Create a subroutine in each file that contains the main code in each one. Then in your "createDB.pl" file use the require keyword to get MacPerl to load all three. Then call your three subroutines in succession, like this: require "file1"; require "file2"; require "file3"; &file1_subroutine(); &file2_subroutine(); &file3_subroutine(); Don -- "Who's the king? Kopechke's the king..." -- Dan Ackroyd for ft.com # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org