How can i remove the "^M" at the and of each line when its doesnt match ? the command is:
perl -pe 's{(">)[^</zone>]}{$1</zone>}g' $travail_dir/zones.txt >$travail_dir/ys.txt
i get this in my ys.txt :
<zone^M
numero_page="005"></zone>^M
<zone^M
id_zone="2"^M
numero_page="005"></zone>
How can i modify my command to get the expected result without "^M" ?