As already noted, it's not actually done "character by character". If it were done that way 'nanosecond' == 'nanosecond' and 'informal' == 'formal' would both be true.
Most places they're both false - though it generally depends upon the underlying libc (and, in some cases, perl bugginess).