g_speran has asked for the wisdom of the Perl Monks concerning the following question:

Hello Perl monks, I am having a little bit of forgetfulness. I am try to determine if a value contained in a variable is within a list of acceptable values.
$a=15; If ( $a == 1,3 5,11-17, 22,28,41-57)
I can’t quite recall the syntax to accomplish this TIA

Replies are listed 'Best First'.
Re: Value within range/list
by pryrt (Abbot) on Feb 15, 2021 at 21:23 UTC
      I apologize! Honestly, i did not remember that I post it.