|---------+-----------------------------------------------> | | [EMAIL PROTECTED] | | | Sent by: | | | [EMAIL PROTECTED]| | | veState.com | | | | | | | | | 11/11/02 22:51 | | | | |---------+-----------------------------------------------> >------------------------------------------------------------------------------------------------| | | | To: [EMAIL PROTECTED], [EMAIL PROTECTED], | | [EMAIL PROTECTED], [EMAIL PROTECTED] | | cc: | | Subject: How can I get the date of today in perl | >------------------------------------------------------------------------------------------------|
>It looks like localtime() function returns both Date and time, I only want >to get date. How can I do that in perl? >Thanks >Lixin Please don't cross-post. localtime returns a nine-element list which is typically used as follows: my ($Sec,$Min,$Hour,$Mday,$Mon,$Year,$Wday,$Yday,$Isdst) = localtime(time); $Mon has a range 0..11, and $Year has 1900 subtracted from it. So to do anything meaningful with the date parts: $Mon++; $Year+=1900; _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs