http://www.perlmonks.org?node_id=1186936


in reply to Read (sysread) binary data into utf8 string

[ In the following, a character refers to a string element. For example, string $str has length($str) characters, which can be obtained using substr($str, $index, 1). Whether that character represents a byte, a Unicode Code Point, or something else is of no consequence. ]