On Thu, May 22, 2008 at 4:30 AM, John ORourke <[EMAIL PROTECTED]> wrote: > william wrote: >> >> Let's say if I have >> $ruleStr = "aaaaaaaaaaaaaa eeeeeeeeeeeeeee"; >> >> open(PARSER,">$self->{parser}.pm"); >> print PARSER $ruleStr; >> >> It will write a few characters only, not complete. Is there a thread >> problem or something ? >> > > You need to explicitly close the file - under CGI, your program exits at the > end of the request and will close any open files. Under mod_perl it will > leave the files open. > > Add close(PARSER) after you finish writing the file - this isn't a > mod_perl thing, it's just good programming practice. > > John > >
Omg, I love you John, lol. Haha, I had spent at lease 3 hours for this, why is it so in mod_perl ? Thanks.