util/scripts/unix_to_dos
author Eckhart Koeppen <eckhart.koppen@nokia.com>
Mon, 19 Apr 2010 10:15:19 +0300
branchRCL_3
changeset 9 b5b118452c7d
parent 0 1918ee327afb
permissions -rwxr-xr-x
a8c775f23625952540b5349744722bcb9e37de45

#!/usr/bin/perl

undef $/;

foreach $f ( @ARGV ) {
    if ( open( F, "< $f" ) ) {
	$i = <F>;
	close F;
	$i =~ s/\n/\r\n/g;
	$i =~ s/\r+/\r/g;
	if ( open( F, "> $f" ) ) {
	    print F $i;
	    close F;
	}
    }
}