#!/usr/bin/perl -w use strict; foreach(<*>) { if (-M $_ > 660) { use File::Copy;copy("$_","/tmp/testdir/") or die "Copy failed: $!";} }