6 b)
Write a Perl program to keep track of the number of visitors visiting the web page and to display this count of visitors, with proper headings.
#! /usr/bin/perl
use CGI ':standard';
print "content-type:text/html","\n\n";
print "<html><head><title>6b </title></head>";
print "<body bgcolor=silver text=white >";
open(IN,"<visit");
$count=<IN>;
close(IN);
open(OUT,">visit");
$count++;
print OUT $count;
close(OUT);
print "<center><b> You are the visitor number: $count </center> </b>";
print " </body></html>";
exit(0);
Write a Perl program to keep track of the number of visitors visiting the web page and to display this count of visitors, with proper headings.
#! /usr/bin/perl
use CGI ':standard';
print "content-type:text/html","\n\n";
print "<html><head><title>6b </title></head>";
print "<body bgcolor=silver text=white >";
open(IN,"<visit");
$count=<IN>;
close(IN);
open(OUT,">visit");
$count++;
print OUT $count;
close(OUT);
print "<center><b> You are the visitor number: $count </center> </b>";
print " </body></html>";
exit(0);
No comments:
Post a Comment