Help for this page

Select Code to Download


  1. or download this
    "Can't use string ("a") as a subroutine ref while "strict refs" in use
    + at line [eval { $result .= &{$_}(@time); };]"
    
  2. or download this
    my %method_map = (a => sub { ... }, A => sub { ... } );
    my $token = 'a'; # or 'A', 'D', etc.
    my $result .= $method_map{$token}->(@args);