in reply to subroutine refs
You can safely create a reference to a subroutine by name and the execute that e.g
use strict; sub dynamic { print "Mmm, dynamic.\n"; } my $name = 'dynamic'; my $subref = \&$name; &$subref();
HTH
_________
broquaint
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: subroutine refs
by blokhead (Monsignor) on Nov 30, 2007 at 18:50 UTC | |
Re^2: subroutine refs
by HelenCr (Monk) on Sep 14, 2013 at 11:44 UTC | |
by Athanasius (Archbishop) on Sep 15, 2013 at 06:45 UTC |
In Section
Seekers of Perl Wisdom