tommy
2012-10-13 15:03:01 UTC
but the output comes out as 9:14:42, Wed Dec 28, 2005 and i only want a hour and minutes format.
how can i simplify the code from the tutorial to just a hour/minute format?
#!/usr/local/bin/perl
@months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
@weekDays = qw(Sun Mon Tue Wed Thu Fri Sat Sun);
($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime();
$year = 1900 + $yearOffset;
$theTime = "$hour:$minute:$second, $weekDays[$dayOfWeek] $months[$month] $dayOfMonth, $year";
print $theTime;
Also, how can i make my html and perl go together ??
here is my html page. so i have the html which has input boxes for name and age and with the action set to a.pl. This means the data should be sent to that perl file and perl will send back the user input name and time right?