Shane, Um, first of all, you probably shouldn't be modifying your cgi script dynamically, Lots of room for error. What you should be doing instead is perhaps updating a text file that the cgi script will open and use as its "Insert content here" content. Next, how is the template.cgi being called? Is it an include in an html page or something? Are you opening it with another cgi script? More information is needed to help you finish resolving this problem.
Regards, David ----- Original Message ----- From: "McElwee, Shane" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 11, 2002 4:40 PM Subject: Executing cgi from perl script Hi, I want to execute a cgi script from a perl script that first updates the cgi script. The basic code I'm using to open and update the file is: print "Content-type: text/html\n\n"; open RESULT, "template.cgi"; while (<RESULT>) { s/Insert content here/$output/g; print; } close RESULT; The cgi file calls the header and footer for the application. When I run it like this I get a web page with cgi code in the header and footer and the correct content. How do I execute the cgi file after updating it? I'm on the right track? Thanks Shane -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]