1N/A chdir 't' if -d 't'; 1N/A# Okay, so that wasn't very challenging. Let's go Unicode. 1N/A my $a = "\x{100}\x{80}"; 1N/A my $a = "\x{80}\x{100}"; 1N/A# Now for Unicode with magical vtbls 1N/A tie $a, 'Tie::StdScalar'; # makes $a magical 1N/A # Play around with Unicode strings, 1N/A # give a little workout to the UTF-8 length cache. 1N/A print length $a == 100 ? "ok 16\n" : "not ok 16\n"; 1N/A print length $a == 99 ? "ok 17\n" : "not ok 17\n"; 1N/A print length $a == 198 ? "ok 18\n" : "not ok 18\n"; 1N/A print length $a == 999 ? "ok 19\n" : "not ok 19\n"; 1N/A print length $a == 998 ? "ok 20\n" : "not ok 20\n";