in reply to Portable string length in bytes
I tried with 5.8 seems fine. However, I leave two things open:use strict; my $a = "1234".chr(4000)."abcd"; { use bytes; print length($a), "\n"; #11 bytes } print length($a), "\n"; #9 chars print length(unpack("b*", $a)) / 8; # 11 bytes
|
|---|