azatoth is technically correct, but remember that -M doesn't output integers. An example from my box:
$ perl -e 'print -M $ARGV[0], "\n"' foo.pl
21.7745138888889
So, -M $file == 7 is true if and only if the file was created precisely 168 hours ago. :) (Excluding leapyears, etc.) So it's better to use the greater-than sign. If for some (unfathomable-to-me) reason you want files that were created seven days ago but not those create more than seven days ago, use int( -M $file ) == 7.
Trying to compare integers with floating-point numbers can be confusing, since there's rarely an exact match.
stephen
| [reply] [d/l] [select] |