Help for this page

Select Code to Download


  1. or download this
    my $n = $x > $y ? $x : $y;
    
  2. or download this
    my $n = (sort {$a <=> $b} $x, $y)[-1];
    
  3. or download this
    use List::Util qw(max);
    my $n = max($x, $y);