Blog
Developers
Careers
Support
Contact
Gossamer Threads
Solutions
Results
About
Mailing Lists
Resource Centre
Forum
Tools
Home
Who's Online
Tags
Favourites
Login
Forum Search
(
Advanced Search
)
This forum
This category
All forums
for
Home
:
General
:
Perl Programming
:
Perl -M file test
Previous Thread
Next Thread
Print Thread
View Threaded
Jun 25, 2002, 12:57 PM
neckbeard44
New User
(2 posts)
Jun 25, 2002, 12:57 PM
Post #1 of 4
Views: 4714
Shortcut
Perl -M file test
I'm not sure how to use the "-M" file test? Or maybe there is an easier way to read in a directory and find out which sub directory has been last modified?
Thanks
Jun 25, 2002, 1:15 PM
Paul
Veteran
(19537 posts)
Jun 25, 2002, 1:15 PM
Post #2 of 4
Views: 4600
Shortcut
Re: [neckbeard44] Perl -M file test
In reply to
-M returns the age of the file in days.
my $age = -M $file;
This is probably a perl forum question...maybe Wil will move it.
Last
edited
by:
Paul
: Jun 25, 2002, 1:18 PM
Jun 25, 2002, 1:43 PM
neckbeard44
New User
(2 posts)
Jun 25, 2002, 1:43 PM
Post #3 of 4
Views: 4599
Shortcut
Re: [Paul] Perl -M file test
In reply to
Great............now how do you decipher this number that it returns? .119837962962963
I completely missed the 'Perl' forum..........now I see it. Not sure how to move this thread?
Jun 25, 2002, 1:58 PM
Paul
Veteran
(19537 posts)
Jun 25, 2002, 1:58 PM
Post #4 of 4
Views: 4586
Shortcut
Re: [neckbeard44] Perl -M file test
In reply to
A moderator will move the thread at some point.
>>now how do you decipher this number that it returns? .119837962962963<<
How do you want to decipher it?...it is the number of days since modification so .11 days.
For arguments sake lets call it 0.1 ....so thats a 10th of a day....so 24 / 10 = 2.4 hours.
I think my math is right :)
Previous Thread
Next Thread
Print Thread
View Threaded