$ perl -we'$x = "combo\x{fff}"; chop($x); 0 eq (~$x&$x)' Useless use of string eq in void context at -e line 1. Malformed UTF-8 character (unexpected continuation byte 0x9c, with no preceding start byte) in bitwise and (&) at -e line 1. Malformed UTF-8 character (unexpected continuation byte 0x90, with no preceding start byte) in bitwise and (&) at -e line 1. Malformed UTF-8 character (unexpected continuation byte 0x92, with no preceding start byte) in bitwise and (&) at -e line 1. Malformed UTF-8 character (unexpected continuation byte 0x9d, with no preceding start byte) in bitwise and (&) at -e line 1. Malformed UTF-8 character (unexpected continuation byte 0x90, with no preceding start byte) in bitwise and (&) at -e line 1.