in reply to use bytes without breaking perl 5.005 or 5.004?

You can make a copy of the string that is marked as a byte string, even if the original string is UTF8, by doing this:
$bytes = pack "C0a*", $bytes_or_utf8;
That should work on pre-5.6 perls too — even though it won't do much.