Help for this page

Select Code to Download


  1. or download this
    $ perl -E 'my @x = qw{3 4 71 1 -598 -100293 0.5 -0.5}; say +(sort { $a
    +->[1] <=> $b->[1] } map $x[$_] >= 0 && $x[$_] == int $x[$_] ? [ $_ =>
    + $x[$_] ] : (), 0 .. $#x)[0][0]'
    3
    
  2. or download this
    $ perl -E '
        my @x = qw{3 4 71 1 -598 -100293 0.5 -0.5};
    ...
        )[0][0]
    '
    3