"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hmmm...maybe the answer to my first post is simply: you can assign to a type glob, *{"color"}, but you can't assign to a subroutine, &{"color"}.
Therefore, if you have a string and you want to dynamically define a function of the same name and then execute the function, you can: 1) Use the string to retrieve a typeglob and then assign a subroutine to the typeglob, which serves to define the function.
2) Subsequently, use the the string as a symbolic reference to retrieve the function and execute it.
In reply to Re: typeglob/symbolic reference question
by 7stud
|
|