in reply to Re^3: 'Variable' sub names
in thread 'Variable' sub names
Keep in mind that your example will call the coderef in $subs{$product} with the current contents of @_ just as if you'd called &namedsub;. If you want to pass an empty argument list you still need the parens: &{ $subs{ $product } }( ). See perldoc perlsub for more details.
|
|---|