Re: Date function




Sharif Islam wrote:
K.J. 44 wrote:
Hi,

is there a date function in Perl or do I have to try to find a module?

What i need is to be able to come up with the current date, then
subtract one day, and add that to the file name in the form of:

YYYY-MM-DD-RestOfFileName.txt

The script I have written parses these files and I want to run it every
night after midnight on the previous days file which has the naming
convention above.

I am running ActiveState Perl in a Windows environment.


You can use the Date::Format module.

Or just the POSIX module's strftime().

.



Relevant Pages

  • Re: Date function
    ... Sharif Islam wrote: ... I am running ActiveState Perl in a Windows environment. ...
    (comp.lang.perl.misc)
  • Re: Date function
    ... I am running ActiveState Perl in a Windows environment. ... There are built-in functions and modules, and numerous ones in the CPAN ...
    (comp.lang.perl.misc)
  • Re: Date function
    ... I am running ActiveState Perl in a Windows environment. ... use strict ...
    (comp.lang.perl.misc)
  • Re: Foreach Code Issue
    ... > Windows Environment for a windows environment and I'm running ActivePerl ... As someone else pointed out you could just open the file directly in perl. ... You are overwriting the file for each $USERID ... close REPORT1; ...
    (perl.beginners)
  • Re: Windows: Perl:Inline
    ... > A problem was encountered while attempting to compile and install your ... The guys on the inline mailing list ... Are you running ActiveState perl? ...
    (comp.lang.perl.modules)