$STRING =~ tr/\x00-\xFF//c # Can be used as a boolean.