my @range = (1, 2, 3, 9, 4.6); if ($var = any(@range)) { # Do stuff here }