use List::Util qw(max); my $n = max($x, $y);