Page 1 of 1

Date in Perl

Posted: Mon Apr 14, 2003 9:47 am
by Nik
This is tha date command for php
$xronos=date("l dS of F h:i:s A");

Whats the equivalent for perl?

Posted: Mon Apr 14, 2003 10:48 am
by twigletmac
Hi could you please post non-PHP programming questions (e.g. like those about Perl) in the Miscellaneous forum because, as it says in the description,:
Miscellaneous
XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).
I've moved this post here because it really is the most appropriate place for it.

Mac

Posted: Mon Apr 14, 2003 10:59 am
by Nik
You are absolutely right, i didnt happen to see the misc forum so far!

Thank you for removing the post....

Do u know why i dont get mail notifications even though i have notify ON?

Posted: Mon Apr 14, 2003 12:02 pm
by volka
you can fetch the current time with

Code: Select all

my $now = localtime time;
if you want the single parts try

Code: Select all

my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime time;
then you can rearrange them as you like.
http://www.cpan.org/modules/index.html lists many modules for date/time-handling.
see also: http://www.perldoc.com/perl5.8.0/pod/fu ... ltime.html