Solution. I just copied what I needed to a new " extractedFiles" (encoded in Mac Roman). Now I have no problems appending lines.
You might do better to write the System's standard utf8. MacRoman is now a legacy encoding and the sooner it and the rest of them cease to plague us the better.
shell> perldoc encoding
#!/usr/bin/perl -w use encoding "MacRoman", STDOUT => "utf8"; my $dir = "$ENV{HOME}/Perl/MyPerl/Virus/New Viruses/Headers"; `mkdir -p "$dir"` ; my $f = "$dir/ extractedFiles.txt"; open F, ">>:encoding(utf8)", $f or die "cannot open extractedFiles: $!"; print F "Extracting head from �somefile�\n" ;
The curly quotes will be encoded in utf8 and the file must be opened as utf8.
