10 print "not " unless length("") == 0;
13 print "not " unless length("abc") == 3;
17 print "not " unless length() == 6;
20 # Okay, so that wasn't very challenging. Let's go Unicode.
25 print "not " unless length($a) == 1;
30 print "not " unless $a eq "\x41" && length($a) == 1;
36 use utf8; # make "\x{80}" to produce UTF-8
39 print "not " unless length($a) == 1;
44 print "not " unless $a eq "\xc2\x80" && length($a) == 2;
52 print "not " unless length($a) == 1;
57 print "not " unless $a eq "\xc4\x80" && length($a) == 2;
63 my $a = "\x{100}\x{80}";
65 print "not " unless length($a) == 2;
70 print "not " unless $a eq "\xc4\x80\xc2\x80" && length($a) == 4;
76 my $a = "\x{80}\x{100}";
78 print "not " unless length($a) == 2;
83 print "not " unless $a eq "\xc2\x80\xc4\x80" && length($a) == 4;