in reply to Re: Appending date to filename for Archiving
in thread Appending date to filename for Archiving

Thanks for that jwkrahn. Can you explain taht statement. I want to get an understanding of what this sattement does
my $file_date = POSIX::strftime '%Y%m%d', localtime( ( stat )[ 9 ]+ );

Replies are listed 'Best First'.
Re^3: Appending date to filename for Archiving
by jwkrahn (Abbot) on Jun 29, 2009 at 14:46 UTC

    That creates a string of the year, month, and day of the mtime of the current file name in $_.   Since you are testing the mtime via the -M operator, that date should be the same as yesterdays date, however you could calculate it yourself if that is what you require.