in reply to My filtered list is not being returned for cp
lomSpace, here's a cleaner version of your approach:
use strict; use warnings; use File::stat; use File::Find; Use File::Copy; use Time::localtime; find sub { if (/^\d+\D\d_(?:LacZ|pgK|SD|SU)/ && -M > 1) { print "$_\n", "ctime: " . ctime(stat($_)->ctime), "\n", "mtime: " . ctime(stat($_)->mtime), "\n"; # copy("$_","$seqdir"); # copy file to new directory } }, $root;
Update: I meant to add warnings, which caught an error in your original post...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trouble filtering files based on date
by lomSpace (Scribe) on Jan 30, 2009 at 21:32 UTC | |
by Anonymous Monk on Jan 31, 2009 at 12:50 UTC | |
|
Re^2: Trouble filtering files based on date
by lomSpace (Scribe) on Jan 30, 2009 at 18:26 UTC |