#!/usr/bin/perl use strict; use Data::Dumper; $|=1; #makes the macro produce all results at once, not in spurts my $filename = "RAH99.html"; my $output = $filename; my $backupoutput = $filename; my $backupoutput =~ s{\.html*}{.entbackup.html}i; open (IN, $filename); my $book = join('',); close IN; open (OUT, ">$backupoutput"); print OUT $book; close OUT; $book =~ s/‘/‘/g; #### $book =~ s/ü/ü/g; my $utf8 = qq!!; $book = "I have changed the most common Unicode characters into HTML entities.\n\nUse this search term to find any leftovers: [€-ÿ]\n\nAlso, don't forget to add a UTF-8 meta tag to your header:\n\n$utf8\n\n".$book; open (OUT, ">$filename"); print OUT $book; close OUT;