tags:

views:

75

answers:

3

Hi,

What is this flag?

if (-M ..filepath..)

what is the '-M' flag?

+2  A: 

Script start time minus file modification time (aka file modification age), in days.

In other words, it returns the age of OPERAND in days when the program started.

Also see a full list of file test operators in perldoc perlfunc (-X section)

DVK
A: 

Modification age (measured in days)

from http://www.devshed.com/c/a/Perl/File-Tests-in-Perl/

if we have something like this:

$age = -M FILE;

$age will contain the days since the file was modified.

KLee1
+5  A: 

perldoc -f -M will answer your question...

This is the modification "age" of the file, in fractional days. That is, it is the number of days since the file was modified, as of the script start time (or as of some other time, if you explicitly set the $^T variable).

I sure hope that the actual code is along the lines of -M filepath > ...; just testing -M's result for truth is pointless.

ysth