$a = "foobar"; $b = "foobAr"; ($a ^ $b) =~ /^(\0*)/ and print length $1; __END__ 4