> jason corbett wrote:
> > How can i rename a file or create a file with the date included? For
> > example, I want to automate and run reports and save the reports
> > under the date of when they were created i.e. JC07082004. Whats the
> > easiest way to do this?   
> > 
> > Thanks,
> > JC
> 
>       Using localtime in conjunction with time, you can roll your own
little setup. 
> 

Additionally, if you didn't know already, Perl has a 'rename' function
built in, or if you are going to g across file system boundaries you
should look at the File::Copy module.

perldoc -f rename
perldoc -f time
perldoc -f localtime
perldoc File::Copy

Additionally you might consider using the Compress::Zlib for compression
of the logs, and you should definitely consider changing your naming
convention to be YYYYMMDD as that will allow the files to sort properly
in their directory.

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to