in reply to Counting chars in a HTML-page

Perl's length() will count spaces and tabs as "characters." It also counts newlines as either one or two characters, depending on your platform. You can probably dodge this by counting characters this way:
my $temp_string = "put stuff here...\n\t...\n"; my $char_count = 0; $char_count++ while $temp_string =~ m/\S/g;
Word ignores newlines and optionally whitespace, plus it auto-replaces some characters. You'll get 18 from the method above, which is also what Word reports -- if you make sure the ... isn't get replaced with a single-character Unicode elipsis.