in reply to Re^2: a loop for creating subroutines?
in thread a loop for creating subroutines?

With methods:

use feature ":5.14"; use warnings FATAL => qw(all); use strict; use Data::Dump qw(dump); sub Mine() {package __SUB__; eval "sub $_ {say \"$_\"}" for qw(hello goodbye); bless {} } my $a = Mine(); $a->hello(); $a->goodbye(); __END__ Produces: hello goodbye

There is a method to his madness. (Hamlet)