util/scripts/unix_to_dos
author Eckhart Koeppen <eckhart.koppen@nokia.com>
Fri, 16 Apr 2010 11:39:52 +0300
branchRCL_3
changeset 8 740e5562c97f
parent 0 1918ee327afb
permissions -rwxr-xr-x
8b5beb2a553102639e9eb38c8f8f0f6775e8545b

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