lucipher has asked for the wisdom of the Perl Monks concerning the following question:

is there a way to include scripts into one single *.pl - like calling scripts though ssi in html? could this be done through the 'require'-command?

long version: i want to include a few scripts into one html-page (i did this with exec) but when i interact with one script i jump in there and leave the original page. could this be done with a little cgi-script?

thanks for the help

ps: sorry if this sounds stupid, i'm fairly new to cgi and are still learning...

Replies are listed 'Best First'.
(ichimunki) Re: include scripts
by ichimunki (Priest) on Jul 18, 2001 at 22:12 UTC
    Exec is normally used for quitting the current script and going to a new system process (which can also be a perl script). System will run a second process and wait while it completes.

    But what you want is to use or require your other scripts. But I would write those other scripts as subroutine libraries callable by the main script (as opposed to standalone scripts). And unless they are very long scripts, you might just want to put all your subroutines in the same file, it will make maintainence that much easier.