#!/usr/bin/perl use strict; use warnings; use CGI; local $|=1; print "Content-type: text/html\n\n"; print "\n"; print " \n"; my $anz = 1000; my $id = 0; my $trigger = 0; for (my $i=1;$i<10000; $i+=1){ my $status = $id/$anz; my $proz = $status*100; if($trigger == 2000){ print "

$proz

\n"; sleep(2); $trigger =0; } $trigger++; $id = $id + 1; } print " \n"; print "\n";