I'm having some issues with some web code I'm writing. It's supposed to print the values that the user input, then do some processing (the printout is just to verify to the user that it got the data, so they don't think the sometimes-long-wait means that it's locked up).
Here's some of the relevant code:
$| = 1;
select(STDERR); $| = 1;
select(STDOUT); $| = 1;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
#reads the input values here
<!--OTHER HTML HEADER STUFF-->
<!--VISIBLE PAGE HEADINGS AND STUFF-->
print "value: $value<br>";
# the above line is repeated for each input value
open(temp_handle, "> log_file");
print(temp_handle "log stuff"); #repeated with information
# the above program can take several seconds to several
# minutes to run
What happens is that it displays on the client everything up to and including the "visible page headers" stuff, but none of the values. However, when I set $| = 0 for the STDOUT one, it prints everything and then does the processing.
Am I misunderstanding how $| works?