use List::Util qw( max ); ($a, $b, $c) = (3, 12, 42); print +(sort { $b <=> $a } $a, $b, $c)[0]; print max ($a, $b, $c);