Remember that coderefs are just scalars and can be stored in any structure.
If you need a 2D array of subs, set up exactly that:
for my $i ( 1 .. 10 ){ for my $j ( 1.. 10 ) { $subs[ $i ][ $j ] = sub{ print 'You called sub_' . $i . '_' . +$j; }; } };; $subs[ 3 ][ 5 ]->();; You called sub_3_5
In reply to Re: Dynamic functions
by BrowserUk
in thread Dynamic functions
by himik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |