in reply to Re: Comparing Dates
in thread Comparing Dates
use File::Find; @ARGV = ('.') unless @ARGV; #start at . unless given # as command line argument sub ProcessFiles { &CheckAndFixFile($File::Find::name); } find(\&ProcessFiles, @ARGV); # find is recursive sub CheckAndFixFile { my $filename = shift @_; #Put code here to check if $filename meets criteria, and delete li +ne if needed. }
The CheckAndFixFile subroutine is where you would use Date::Manip, or whichever Date module you like, to compare dates. It's easier than writing your own regular expression, as you did in your post, and it's code that's been tested and works.
|
|---|