Search for Date::ManipThat is a perl module included with TS and will do it for you. One point, this is not an efficient PM (it is extremely flexible and you pay for it with performance). So if it really matters that this not take .1 second (like you are doing it in a loop several thousand times) then find another alternative. If this is something that will be run several times an hour, big deal, use it.It is easy to use, but you can use a hash and regex to do this as well.
I thought the concerns that Date::Manip is slow are long behind us as the processors' power has eclipsed them
Certainly not with any of the **** that you've written. :-)
mainip works,but really slow.my perl script will update 3000 files, it costs 70 seconds.once I put manip into the program, it will run around 5 minutes