Help for this page

Select Code to Download


  1. or download this
        when ($_ >= 8 && $_ <= 11)     # $index here is min( 2, 5), so 2
        when ($_ >= 12 && $_ <= 15) {  # $index here is min( 3, 5), so 3
        when ($_ >= 16 && $_ <= 19) {  # $index here is min( 4, 5), so 4
        when ($_ >= 20) {              # $index here is min( 5+,5), so alw
    +ays bounded at 5
    
  2. or download this
    my %check_dispatch = (
      2 => sub { ... }, # or better, define in named subs and, => \&check1
    +, etc
    ...
    if ($check_dispatch{$index} and 'CODE' eq ref $check_dispatch{$index})
    + {
      die if not $check_dispatch{$index}->($pw);
    }