title: perl value in 'range' of random array
body: <p>I'm having the next problem, I have some random values in one array and I want to print a message if one of those values in array matches my variable. 
  Example:</p>
  
  <pre><code>my @random_pool = (1, 30, 13, 40, 58, 7);
  my $value = 17;
  </code></pre>
  
  <p>Want I want to do is:</p>
  
  <pre><code>if($value in @random_pool) {
     print "match";
  } else {
     print "not mach";
  </code></pre>
  
  <p>Also would a solution be possible if there wasn't an array but a string?</p>
  
  <p>Example:</p>
  
  <pre><code>my $random_pool = "1, 30, 13, 40, 58, 7";
  my $value = 17;
  
  if($value in $random_pool) {
     print "match";
  } else {
     print "not mach";
  </code></pre>
  
  <p>Thank you</p>