in reply to comparing file times
if ( -M $file1 < -M $file2) { print $file2, ' is older!', $/; } [download]
You might also consider reading this perlfunc:_X.