in reply to variable sub function?
And just repeat '*mySub2 = \&mySub' for each sub you need to setup (changing the name of mySub2).sub mySub { print "this sub\n"; } *mySub2 = \&mySub; mySub2();
If you want to learn more about typeglobs, I recomend Advanced perl programming (there are a lot of other goodies in there as well).
|
---|