It also means that you now have a mechanism that will allow you to construct a string of packed integers that Perl has no way of unambiguously deconstructing.I don't understand this at all.
This is what I mean:
$a = ''; $a .= chr 1<<$_ for 0..63;; Dump $a;; SV = PVMG(0x37b528) at 0x3058a0 REFCNT = 1 FLAGS = (SMG,POK,pPOK,UTF8) IV = 0 NV = 0 PV = 0x3cb90f8 "\1\2\4\10\20 @\302\200\304\200\310\200\320\200\340\2 +40\200\341\200\200\342\200\200\344 ... \200"\0Malformed UTF-8 character (byte 0xfe) in subroutine entry Malformed UTF-8 character (byte 0xfe) in subroutine entry Malformed UTF-8 character (byte 0xfe) in subroutine entry Malformed UTF-8 character (byte 0xfe) in subroutine entry Malformed UTF-8 character (byte 0xfe) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry Malformed UTF-8 character (byte 0xff) in subroutine entry [UTF8 "\x{1}\x{2}\x{4}\x{8}\x{10} @\x{80}\x{100}\x{200}\x{400}\x{800} \x{1000}\x{2000}\x{4000}\x{8000} \x{10000}\x{20000}\x{40000} CUR = 504 LEN = 512 MAGIC = 0x3c856c8 MG_VIRTUAL = &PL_vtbl_utf8 MG_TYPE = PERL_MAGIC_utf8(w) MG_LEN = -1 print join '-', map ord( chop $a ), 1 .. 64;; 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0- +0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
And:
$a = ''; $a .= chr 1<<$_ for 0..63;; print length $a;; 64 $a = reverse $a;; Malformed UTF-8 character (byte 0xfe) in reverse at (eval 47) print length $a;; 75
If Perl can't handle it, it's a bug, not a feature. And not something I would concern myself with trying to handle.
Yet another, just another red herring.
In reply to Re^38: Interleaving bytes in a string quickly
by BrowserUk
in thread Interleaving bytes in a string quickly
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |