Help for this page

Select Code to Download


  1. or download this
      my $regex = join '|', @all_the_different_values;
    
      if ( $data =~ /$regex/ ) . . .
    
  2. or download this
      if ( $data =~ /^($regex)$/ ) . . .
    
  3. or download this
      my %set;
      @set{ @all_the_different_values } = (); # make the set
    
      if ( exists $set{ $data } ) . . .