in reply to substr on utf8-strings
output is:#!perl use strict; use warnings; $_ = "a\x{2322}bcd\n"; print substr($_, 0, 3), "\n";
Or at least that's as close as PerlMonks can display. The important thing is that it prints from a to b.Wide character in print at try2.pl.txt line 6. aΓîób
|
|---|