in reply to HTML entities converted to Non-Latin-1 format...

$text =~ s/[^\x{00}-\x{ff}]//g; But this is a bad idea sind you'll lose information. Better inform yourself about unicode, and how to handle it in perl.