RosettaCodeData/Task/Integer-comparison/Perl/integer-comparison-3.pl

6 lines
197 B
Perl

# Get input, test and display
print "Enter two integers: ";
($x, $y) = split ' ', <>;
print $x, (" is less than ", " is equal to ",
" is greater than ")[test_num($x, $y) + 1], $y, "\n";