From: Cathal Garvey (me at domain cgarvey.com)
Date: Wed 03 May 2000 - 14:39:40 IST
This should help a little .....
sub curTime sets the global $dateStr !!
sub curTime {
at domain days = ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday");
at domain months = ("January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December");
($ignore, $min, $hour, $day, $mon, $year, $wday, $ignore, $ignore) =
gmtime();
$day ++;
$dateStr = $days[$wday] . ", " . $months[$mon] . " " . $day;
if ($day == 1 || $day == 21 || $day == 31) { $dateStr = $dateStr . "st"; }
elsif ($day == 2 || $day == 22) { $dateStr = $dateStr . "nd"; }
else { $dateStr = $dateStr . "th"; }
$dateStr = $dateStr . ", " . (1900 + $year) . ".";
}
-----Original Message-----
From: ilug-admin at domain linux.ie [mailto:ilug-admin at domain linux.ie]On Behalf Of Tina
Marie
Sent: 02 May 2000 21:33
To: ilug at domain linux.ie
Subject: [ILUG] Re: need help printing the date
How do you print the date from a perl script.
>I'm having trouble printing the date command from my perl script.
I used "echo" it only gives my an error message.
Tina
____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at
http://webmail.netscape.com.
-- Irish Linux Users' Group: ilug at domain linux.ie http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information. List maintainer: listmaster at domain linux.ie
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:00 GMT