Help for this page

Select Code to Download


  1. or download this
    if ($_ eq 'A' || $_ eq 'B' || $_ eq 'C') { }
    
  2. or download this
    if ({A =>1, B =>1, C =>1}->{$_}) { }
    
  3. or download this
    if (/^(A|B|C)$/) { }
    
  4. or download this
    my $chr = $_;
    grep { $chr eq $_ } qw( a b c );