Help for this page

Select Code to Download


  1. or download this
    my %actions = (
           this => \&this,
    ...
           foo  => \&foo,
           bar  => \&bar,
           zzz  => \&sleepytime);
    
  2. or download this
    if($in eq "this"){&this}
    if($in eq "that"){&that}
    if($in eq "foo"){&foo}
    if($in eq "bar"){&bar}
    if($in eq "zzz"){&zzz}
    
  3. or download this
    foreach(@actions){ if($in eq $_){&$_()}}
    
  4. or download this
    $in=param('in');
    @actions=qw(this that foo bar zzz); 
    foreach(@actions){ no strict "refs"; if($in eq $_){&$_()}}