Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    if ( $action_ref->{$choice} ) { $action_ref->{$choice}->(); }
    else { warn "Unknown option: '$choice';\n" }
    
  2. or download this
    $VAR1 = {
              'HTML' => sub { "DUMMY" },
    ...
              'Console' => sub { "DUMMY" },
              'PDF' => sub { "DUMMY" }
            };