sub stream_dynamic_html { my ($self) = @_; $| = 1; open TEMP_HTML_FILE, ">$temp_dynamic_html_fpath"; $self->stream_file($temp_dynamic_html_fpath, 10); my $q = $self->query(); print TEMP_HTML_FILE $q->start_html(-title => 'HTML page dynamically streamed to scean'); print TEMP_HTML_FILE $q->h3('HTML page dynamically streamed to scean'); print TEMP_HTML_FILE $q->p("The following lines will be printed at 1 sec interval."); for (my $ii=0; $ii<3; $ii++) { print TEMP_HTML_FILE $q->p("This is line $ii.\n"); sleep(1); } print TEMP_HTML_FILE $q->p()."\n"; print TEMP_HTML_FILE "Stream dynamic HTML page
\n"; print TEMP_HTML_FILE "Stream static file
\n"; print TEMP_HTML_FILE $q->end_html(); close TEMP_HTML_FILE; }