in reply to Apply mtime and atime to new file
If the old filename already ends '.new' you will replace '.new' with '.new' to get the old filename again. If the old filename ends in something else, you will chop off the last character and then add '.new'. "test.it" will become "test.i.new"$new_str = substr($found_file, 0, index($found_file,'.new')) . '.new +';
Otherwise isn't the problem just that you have renamed the file from the name $new_str to the name $found_file, and then try to change the times for the file named $new_str, which isn't there anymore?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Apply mtime and atime to new file
by APA_Perl (Novice) on Dec 08, 2003 at 16:28 UTC |