in reply to How does the built-in function length work?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How does the built-in function length work?
by ikegami (Patriarch) on Dec 02, 2011 at 19:30 UTC | |
by moritz (Cardinal) on Dec 02, 2011 at 21:02 UTC | |
by JavaFan (Canon) on Dec 02, 2011 at 21:27 UTC | |
by ikegami (Patriarch) on Dec 02, 2011 at 21:48 UTC | |
by moritz (Cardinal) on Dec 03, 2011 at 06:22 UTC | |
by ikegami (Patriarch) on Dec 03, 2011 at 07:53 UTC |