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 date and time. > > sytem "date" spits out an string of 30 characters long to > standart output with current date and time followed by a newline.
System "date"? Not on my system is doesn't: that's terrible "perl" advice to give since it doesn't relate to a perl function, which is what the chap was asking for. I'm sure you've heard by now, but in case you haven't: "perldoc -f localtime" for today's date and time, in parts you can arrange as you wish. For yesterday or tomorrow you might want to look at DateTime and http://datetime.perl.org/ Hth -- http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>