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