
Jasmine
Administrator
/ Moderator
Apr 12, 2000, 2:53 PM
Post #2 of 2
(192 views)
|
|
Re: Forcing output before script finishes
[In reply to]
|
Can't Post
|
|
To make a program display its results as it executes (opposed to when the script completes), you can flush the Perl buffer by using: $|=1; $| is the variable for the perl buffer. By default, it's set to not flush (false). So by making the value 1 (true), the buffer will flush as soon as there's something to output, and will continue to do so until the program completes. Note that while the program will flush with $|=1, the javascript onLoad command waits until all elements of the page are loaded. Depending on your images and other page elements, and the what the program does after the unlocking, there may not be enough time before the onLoad command is invoked before the file is relocked.
|