The sub requires two strings as the input and returns:
-1 if the strings are equal or both returning false when used in a boolean op (e.g. undef or length zero or '0', but not '00')
0 if one string is false (as above) and not the other one
the position of the first different character (0 if the first character is not equal, 1 if the second,etc)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.