title: How To Write a perl cgi script which keeps on flushing with current time in the same browser instead of printing alist of times
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/10597184/reg-perl-cgi-script-autoupdate-with-new-data">Reg: Perl CGI script Autoupdate with New Data</a>  </p>
  </blockquote>
  
  
  
  <p>A perl CGI script continuosly updating the time, instead of creating a time list</p>
  
  <pre><code>#!C:/perl/bin/perl.exe
  use warnings;
  use strict;
  use CGI;
  
  local $| = 1;
  
  my $cgi = new CGI;
  my $string = localtime();
  print $cgi-&gt;header();
  print $cgi-&gt;start_html("Welcome");
  print $cgi-&gt;h1("$string");
  print $cgi-&gt;end_html();
  
  print $cgi-&gt;header();
  print $cgi-&gt;start_html("Welcome");
  print $cgi-&gt;h1("$string");
  print $cgi-&gt;end_html();
  </code></pre>