| 1.) Upload to your cgi directory, chmod 755. You
can call it either through your browser or using an include statement in
your SSI file.
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
localtime (time);
@Days = ("Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday",
"Saturday");
@Months = ("January", "February", "March",
"April", "May", "June", "July",
"August", "September", "October",
"November", "December");
$day = $Days[$wday];
$date = $mday + 0;
$year = 1900 + $year;
$month = $Months[$mon];
# Format the date any way you want, ie. $date/$month/$year or
$year/$date/$month
print qq~
<font size=2>Today's date is $month,$date $year.</font>
~;
exit;
|
|
|
|