#!/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; }