There are two ways that perl 5 stores strings. If the UTF8 flag is set, length returns the number of characters, not bytes.
If the flag is not set, perl assumes that the encoding is ISO-8859-1, and there the number of bytes is equal to the number of characters.
In reply to Re: How does the built-in function length work?
by moritz
in thread How does the built-in function length work?
by PerlOnTheWay
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |