perlquestion
samwyse
The following doesn't generate any errors, but if it's changing the time stamps then something's changing them back immediately. Can anyone help?
<code>
#!/usr/bin/perl -pi.bak
# Strip DOS CR chars, hopefully without affecting mtime
s/\cM//g;
if (eof) {
@times = (stat($ARGV.$^I))[8,9];
close ARGV;
utime @times, $ARGV or warn;
}
</code>
This is perl, v5.8.8 built for aix-thread-multi, if it matters.