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
In reply to Re: Portable string length in bytes
by pg
in thread Portable string length in bytes
by moseley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |