> # encode UTF8 octet > use Encode qw(decode encode); > my $octets = encode('UTF-8', $xls); OUt of curiousity, where's the data in $xls come from, and what do you know about its encoding and bytes vs characters status?