Help for this page

Select Code to Download


  1. or download this
    my %dispatch_table = (
        foo => \&foo,
        bar => sub { mumble; },
    );
    
  2. or download this
    sub generate {
        my $foo = shift;
        sub { $foo };
    }
    
  3. or download this
    sub callit {
        my $sub = shift;
        $sub->(@_);
    }
    
  4. or download this
    # in a scope . . .
        local *foo = generate 'bar';