in reply to Re: How to process only files created on specific month?
in thread How to process only files created on specific month?

Hello Zaxo,
how would you include the oposite situatuion? (File with name November, but with mtime shown sa December) In one script? Thank you.
  • Comment on Re: Re: How to process only files created on specific month?

Replies are listed 'Best First'.
Re: Re: Re: How to process only files created on specific month?
by Zaxo (Archbishop) on Jan 23, 2004 at 21:54 UTC

    I'd quit messing with file names and just go by mtime. Here's a way to make an AoA of file names.

    my @files; while (<*.txt>) { push @{$files[ (localtime +(stat)[9])[4] ]}, $_; }
    That gives you the November files as @{$files[10]}. You may want to rewrite that to take account of years, too. A hash may be more convenient than an array.

    After Compline,
    Zaxo