Help for this page

Select Code to Download


  1. or download this
      if ( grep { $ref == $_ } 1..8 )  { ... }
    
  2. or download this
      if ( $ref >= 1  and  $ref <= 8 )  { ... }
    
  3. or download this
      if ( $ref =~ /^[1-8]$/ )  { ... }
    
  4. or download this
    use v5.10;
    use strict;
    ...
        default               { say "ELSE $ref" }
      }
    }
    
  5. or download this
    A 1
    B 9
    C 17
    D 25
    ELSE 33