my $exists = scalar grep { my $x = int $_; "$x" eq $_ } @ARGV; if (defined $exists) { $input = $exists; }