This should help a little .....
sub curTime sets the global $dateStr !!
sub curTime {
@days = ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday");
@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 linux.ie [mailto:ilug-admin at linux.ie]On Behalf Of Tina
Marie
Sent: 02 May 2000 21:33
To: ilug at 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 linux.iehttp://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
List maintainer: listmaster at linux.ie
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!