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


in reply to How scalars work (about numbers, text strings, and binary strings)

One way to keep binary strings seperate from text strings when you have to deal with both is to use hungarian notation.

my $bin_msg = ...; my $txt_msg = decode($encoding, $bin_msg);

See Making Wrong Code Look Wrong for more on the subject.

(I usually use "bytes" and "chars". I used "bin" and "txt" here to be in line with your diagram.)