Help for this page

Select Code to Download


  1. or download this
    if ($name ~~ [$t1, $t2]) {
       ...;
    }
    
  2. or download this
    use match::smart "match";
    
    if (match $name, [$t1, $t2]) {
       ...;
    }
    
  3. or download this
    use match::simple "match";
    
    if (match $name, [$t1, $t2]) {
       ...;
    }
    
  4. or download this
    use List::Util "any";
    
    if (any { $name eq $_ } $t1, $t2) {
       ...;
    }