Hi all, I already sent this as a reply to another post, but did not receive an answer. In the following script, the results are not printed at once, line by line, but in one block after several seconds:
___BEGIN CODE___ #!/usr/bin/perl -wT use CGI; use strict; use LWP::UserAgent; my $q = new CGI; print $q->header(-type=>'text/html', -charset=>'utf-8'), $q->start_html("URL-Checker"), $q->h1('URL-Checker'); if ($q->param) { my $input = $q->param('input'); my @urls = split /[\r\n]+/, $input; my $fh = $q->upload('input_file'); while (<$fh>) { my @line = split /[\r\n]+/; push @urls, @line; } for (@urls) { $_ = "http://" . $_ unless /^http/; my $browser = LWP::UserAgent->new( ); $browser->requests_redirectable([]) if ($q->param('no_redirect')); my $response = $browser->get($_); if ($response->status_line eq "200 OK") { print qq{<p><span style="color:green">'$_'</span> is valid</p>}; } else { print qq{<p><span style="color:red">'$_'</span> is not valid<br /><b>Response status:</b> }, $response->status_line, "</p>"; } } } else { # html form is displayed here } print $q->end_html; ___END CODE___ I would expect that $| = 1 alters this behaviour - but it doesn't. Why? Thanks, Jan -- Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining. - Jeff Raskin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>