I am trying to create a conditional statement "if" that will check if a value is in a list of values. Right now, I simply do this:
if ( $myvar == 'VAR0123' || $myvar == 'VAR1234' || $myvar == 'VAR2345' )
I would prefer to setup all my "values" in an array or hash at one place and then do something like:
if ( $myvar ISIN $mylist )
Can this be done easily in Perl? Maybe using a hash table? Any ideas?