#!/usr/bin/perl use strict; use warnings; use CGI qw(:all); #Create a new CGI object my $cgi = new CGI; print "Content-type:text/html\n\n"; print << SOFTWARE DIAGNOSTIC >Generating Self-Referential URLs

SoftDiagno
EndOfHTML #### #!/usr/bin/perl use Tk; use Tk::ProgressBar; use strict; use CGI qw(:all); my $percent_done = 0; my $cgi = new CGI; print "Content-Type: text/html \n\n"; my $mw = MainWindow->new; my $text = "Percentage to date: $percent_done"; $mw->title('Progress Bar'); my $message = $mw->Message(-textvariable => \$text, -width => 130, -border => 2); my $progress = $mw->ProgressBar( -width => 30, -from => 0, -to => 100, -blocks => 50, -colors => [0, 'green', 50, 'yellow' , 80, 'red'], -variable => \$percent_done )->pack(-fill => 'x'); my $exit = $mw->Button(-text => 'Exit', -command => [$mw => 'destroy']); my $get = $mw->Button(-text => 'Press to start!', -command => \&start); $get->pack; $message->pack; $exit->pack; MainLoop; sub start { for ($percent_done=0; $percent_done <= 100; $percent_done +=20) { $text = "Loading: $percent_done%"; $mw->update; sleep 1; } $text = 'Done!'; $mw->update; }