In the spirit of TMTOWTDI, you could write your stuff in to another file and require it. Though, more out of curiosity's sake, what do you want to put in to your CGI script? Having an external process modify a live CGI could be considered a breach of security, but I'm no expert in such things...