Help for this page

Select Code to Download


  1. or download this
    my %table = (
        foo => sub { ... },
        bar => sub { ... },
        baz => sub { ... },
        # ...
    }
    
  2. or download this
    {
        my ($n, $r);
        no strict qw(refs);
        *{$n} = $r while ($n, $r) = each %table;
    }