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----- >From: [EMAIL PROTECTED] >Sent: Sep 21, 2006 7:38 AM >To: beginners@perl.org >Subject: Date and Time Functions > >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 > >-- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] ><http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>