CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
910614 - what does -M mean?

 



hamidi
New User

Sep 4, 2012, 3:53 AM

Post #1 of 6 (2375 views)
910614 - what does -M mean? Can't Post

and may be used before what kind of variables (variables of what kind of values, int, string, etc.)?
it must be similar to -f, right?


rovf
Veteran

Sep 4, 2012, 5:58 AM

Post #2 of 6 (2372 views)
Re: [hamidi] 910614 - what does -M mean? [In reply to] Can't Post

This information is a bit hidden in the docs. Have a look at

perldoc perlfunc

and grep for

-X


Laurent_R
Veteran / Moderator

Sep 4, 2012, 10:48 AM

Post #3 of 6 (2356 views)
Re: [hamidi] 910614 - what does -M mean? [In reply to] Can't Post

In which context?

In a Boolean context before a file name, it returns the file last modification time. At the command line, it does import a module.


hamidi
New User

Sep 4, 2012, 8:19 PM

Post #4 of 6 (2342 views)
Re: [Laurent_R] 910614 - what does -M mean? [In reply to] Can't Post

thx 4 replying
i found it at perlfunc. as i examined it, it doesn't return the last modification time of the file. if so, it should be the same as what Windows shows in the properties dialog of the file as the last modification time. i found that it's the same as "$^T-the last modification time of the file". then when i multiply it to 24*60*60 this value changes to number of seconds between the last modification time of the file and when the script has begun running.
correct me if i'm wrong.
thx


rovf
Veteran

Sep 5, 2012, 1:23 AM

Post #5 of 6 (2334 views)
Re: [Laurent_R] 910614 - what does -M mean? [In reply to] Can't Post


Quote
before a file name, it returns the file last modification time.


From the perldocs:

-M Script start time minus file modification time, in days.


Laurent_R
Veteran / Moderator

Sep 5, 2012, 10:27 AM

Post #6 of 6 (2298 views)
Re: [rovf] 910614 - what does -M mean? [In reply to] Can't Post

Yeah, right, I typed too fast, I meant the time elapsed (in days) between the last time the file was modified and the time the script was started.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives