programming-examples/perl/CGI/Generates HTML with the use of CGI.pm using the conventional style.pl

21 lines
522 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl -w
use strict;
use CGI ':standard';
print
header(),
start_html('Generating HTML'),
h1('Now Is:'),
p('The current date and time is:', scalar(localtime)),
hr(),
h1('This is heading 1');
my $file_listing = '';
$file_listing .= "<br />$_" foreach <*.pl>;
print
p('This is a ','file list:', $file_listing),
h1('Go Here For Excellent Books!'),
p('Check out the',a({ href => 'http://www.java2s.com/' }, 'www.java2s.com Home Page')),
end_html();