On 5/30/03 at 2:13 PM, [EMAIL PROTECTED] (Martin Lomas) wrote: > Hi All, > > I hope someone here could help me ... I know Perl, HTML and > Javascript quite well, but CGI not at all. > > I'm writing a simple file-upload Perl script. I have all the form and > file handling stuff done. I want the script to write an HTML message > to the user's browser before the upload begins, you know, like > "Upload in progress". Then when the upload completes, I want to > replace that screen with "Upload complete". > > I'm trying simple Perl "print" commands in subroutines to write the > HTML out. Depending on things I try, I'm getting: > > - Both messages are written together AFTER the upload, or > - The 1st message is written but not the 2nd, or > - Internal Server Error 500. > > Obviously there's something about writing/updating HTML and program > flow that I don't get. Is CGI the answer? Please help! I'll send code > if necessary, but hopefully there's an easy framework for this. >
I wonder if you auto-flush the buffer, like: $|=1; print "Content-type: text/plain\n\n"; print "I'm starting to do something"; #...do something... print "OK I'm done now"; #just a thought -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]