in reply to Compare two signed integers without using comparision operator in perl

Subtract them and check the sign of the result.

To do the latter without a comparison operator, check equality to "0", or test if it starts with a "-" character, for example with a regexp, or with substr.

  • Comment on Re: Compare two signed integers without using comparision operator in perl