Help for this page

Select Code to Download


  1. or download this
    my $regex = join '|', map "\Q$_\E", @vals;
    doSomething() if $data =~ $regex;
    
  2. or download this
    use Regex::PreSuf;
    
    doSomething() if $data =~ presuf(@vals);
    
  3. or download this
    doSomething() if grep $data =~ /\Q$_/, @vals;