dr.jekyllandme has asked for the wisdom of the Perl Monks concerning the following question:
I've been Googling this but haven't gotten a straight answer or I am just confused. If anyone can nudge me in the right direction, it would be great. Thank you.#!usr/bin/perl use strict; use warnings; use File::stat; my @files= <>; # Slurp list of files given in a file in cmd line foreach( @files ) { print; chomp; my($month, $year) = ( localtime( stat($_)->ctime ) )[4,5]; $year += 1900; print "$month $year\n"; # if $month, $year are within June 2011 and June 2012 do something }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to find if a certain is within a time period?
by BrowserUk (Patriarch) on Aug 22, 2012 at 02:27 UTC | |
|
Re: How to find if a certain time stamp is within a time period?
by aitap (Curate) on Aug 22, 2012 at 07:36 UTC |