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

my @ints = ( int( rand() * 100 ), int( rand() * 100 ) ); print "Which is larger?\n1) $ints[0]\n2)$ints[1]?\n"; chomp( my $input = <STDIN> ); print "$ints[ $input ] is larger.\n";
  • Comment on Re: Compare two signed integers without using comparision operator in perl
  • Download Code

Replies are listed 'Best First'.
Re: Re: Compare two signed integers without using comparision operator in perl
by jgallagher (Pilgrim) on May 06, 2003 at 19:08 UTC
    I read this, did a double take, then laughed out loud. :-)