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

Why?

artist

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

Replies are listed 'Best First'.
Re: Re: Compare two signed integers without using comparision operator in perl
by Das (Initiate) on May 06, 2003 at 19:22 UTC
    It is not a practical problem, it is just a quiz to rewrite the following code:
    ($a == $b) ? print "equal" : ( ($a < $b) ? print "a is small" : print + "b is small");
    without using the comparision operators like ==,<,> .