Kashratul has asked for the wisdom of the Perl Monks concerning the following question:
I like to put forward a question:
Is is possible to make the name of a subroutine dynamic i.e.let us assume that we have a variable = $a
now I want to name a subroutine with the value of the variableSo if the $a value is "TYPE" - then subroutine name changes to Type
If the $a value is "CLICK" - then subroutine name changes to CLICK
I am not sure whether this is at all possiable - I just want advise whether this can be done if so how
Thanks for your time
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Initializing a subroutine with the value of a variable
by holli (Abbot) on Dec 17, 2009 at 15:10 UTC | |
|
Re: Initializing a subroutine with the value of a variable
by The Perlman (Scribe) on Dec 17, 2009 at 23:41 UTC | |
|
Re: Initializing a subroutine with the value of a variable
by Anonymous Monk on Dec 17, 2009 at 14:47 UTC |