Perl output pretty HTML

# outputting pretty HTML

# basically a matter of including \n
# and using Perl qq function

my (@time,@days,@months,$time,$days,$months);

@time = localtime;

@days = qw(Sunday Monday Tuesday Wednesday Thursday Friday Saturday);

@months = qw(January February March April May June July August September October November December);

print qq(\n<html>\n<head>\n<title>Get the date</title>\n</head>\n<body>\n);

print qq(Today is <strong>$days[$time[6]], $months[$time[4]] $time[3]</strong>.);

print “\n</body>\n”;

print ‘</html>’;

Leave a Reply

You must be logged in to post a comment.