#!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 }