http://www.perlmonks.org?node_id=250049

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

I have a list of numbers -

10,11,12,13,14,15,17,18,22,23,24,25,26,27,28,29,30,31,32,33,34,35
and a varible $x which stores an arbitary value
I want an if loop which is true if $x matches a value in my list. In other words, if $x is 10 then the if loop is executed, if its 5 then it is not.
whats the simplest way of doing this?