open (IN, "daten1.xml") or die "cannot read from file : $!"; open (OUT, ">daten2.xml") or die "cannot write to file : $!"; while () {    print OUT encode_entities($_); } close OUT or die $!; close IN or die $!;