
The encode module provides the interfaces between perl's strings and the rest of the system.
when perl is processing "binary data", the programmer wants perl to process "sequences of bytes". this is not a problem for perl - as a byte has 256 possible values, it easily fits in perl's much larger "logical character".
encodes a string from perl's internal form into encoding and returns a sequence of octets.