#!/bin/env perl use strict; use warnings; my %dispatch = map { $_, \&{'_create_' . $_} } qw(first last); sub _create_first { print "first!\n"; } sub _create_last { print "last!\n"; } $dispatch{first}->(); $dispatch{last}->(); __DATA__ first! last!
Update: Do you have a subroutine called _create_create_password?
In reply to Re: Creating dispatch table with variable in function name
by Mr. Muskrat
in thread Creating dispatch table with variable in function name
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |