for my $x (qw( cat dog fish )) { no strict 'refs'; *{"function_$x"} = sub { print $x }; } function_cat(); # print "cat" function_banana(); # error
In reply to Re: Technique for building arguments from function name?
by Anonymous Monk
in thread Technique for building arguments from function name?
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |