R
rss
Hello I have a bit of CGI code which works fine which writes a file and
sends an email fine
I add a simple open file and close file after closing bothe files and
suddenly the HTML part which finished at the top causes an error
The file by the way is created just fine. It only causes the HTML
displayed to the bowser to mess up somehow? How why? WIERD?
Can anyone explain this?? I thought perhaps it had to do with
flushing the fuffer and so I tried the following:
select(STDOUT);
$| = 1;
after the last <./HTML> tag is written out. The whole thing is really
strange. Does anyone have any theories as to what went wrong?
Again the only thing that messes up happens when I add the three
statements is the web page. The rest of the program completes. If that
is not the wierdest behavior!!!
open xfile, "> $xfilename" || die "can not open $xfilen
ame";
print fedxfile sprintf("Mytest\n");
close(fedxfile);
comment the above 3 lines and all works fine
As I said even when the HTML part fails the added statements above work
and the output files shows up as one would expect!
I have a workaround but perl definitely appears to behave extremely
wierd regarding this. Anyone know why??
sends an email fine
I add a simple open file and close file after closing bothe files and
suddenly the HTML part which finished at the top causes an error
The file by the way is created just fine. It only causes the HTML
displayed to the bowser to mess up somehow? How why? WIERD?
Can anyone explain this?? I thought perhaps it had to do with
flushing the fuffer and so I tried the following:
select(STDOUT);
$| = 1;
after the last <./HTML> tag is written out. The whole thing is really
strange. Does anyone have any theories as to what went wrong?
Again the only thing that messes up happens when I add the three
statements is the web page. The rest of the program completes. If that
is not the wierdest behavior!!!
open xfile, "> $xfilename" || die "can not open $xfilen
ame";
print fedxfile sprintf("Mytest\n");
close(fedxfile);
comment the above 3 lines and all works fine
As I said even when the HTML part fails the added statements above work
and the output files shows up as one would expect!
I have a workaround but perl definitely appears to behave extremely
wierd regarding this. Anyone know why??