#!/usr/bin/perl

open MYFILE, $ARGV[0] or die "Can't open file $ARGV[1]\n";


while (<MYFILE>) {
    $original = $_;         # Save original line
    chomp;                  # Remove ending newline
    $lastchar = chop;       # Remove the last character...
    if ($lastchar ne "^M")  #   if it wasn't a ^M,
	{print $original;}  #     print original
    else
	{print $_,"\n";}    # else print the edited line.
}

