in reply to Dynamic functions
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
|
|---|