On Nov 9, 2007 1:27 PM, Martijn <[EMAIL PROTECTED]> wrote: > Hello. > > I simple question to which that I can't find the answer. How does one > create a subroutine whose name is defined by the value of a variable? > To be more precise, I need to write a bunch of subroutines foo_bar1, > foo_bar2, ... where 1) I can't know the number of these routines > beforehand and 2) because of other modules I am using, they need to > have these very names. In particular, I can't make one subroutine > foo_bar that has the number as its argument. Well, I can, but I'd > still make my code understand that foo_bar1() should call foo_bar(1). > > I thought this was something quite simple, but now I'm not even sure > if it's possible at all. > > Thank you. > > Martijn.
Your explanation of what you want to do is muddled, perhaps it would be better if you told us what you are trying to achieve or the problem that has led you to come up with this approach. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/