Xavier Mas i Ramón [mailto:[EMAIL PROTECTED] :
> A Dijous 21 Setembre 2006 01:38, [EMAIL PROTECTED] va escriure:
>
> > I am looking for some simple perl functions that will return the
> > current date and time in string format. The purpose is to create a
> > file with part of the name being the d
A Dijous 21 Setembre 2006 01:38, [EMAIL PROTECTED] va escriure:
> Hello
>
> I am looking for some simple perl functions that will return the current
> date and time in string format. The purpose is to create a file with part
> of the name being the date and time.
>
> Thanks,
> Andrew
sytem "date"
On Wed, 20 Sep 2006 [EMAIL PROTECTED] wrote:
> Hello
>
> I am looking for some simple perl functions that will return the current date
> and time in string format. The purpose is to create a file with part of the
> name being the date and time.
I use something like this
Hi,
Many of the functions exist on CPAN.One of them is 'strftime' which is coming
from POSIX.
use POSIX 'strftime';
print strftime "%Y-%m-%d",localtime;
__END__
You'll get:
2006-09-21
As the same effect as the unix command of 'date +%Y-%m-%d' 's output.
Hope it helps.
-Original Message-