use List::Util qw( max ); . . . print 'Largest: ', max( $a, $b, $c );