in reply to references to subroutines
Your question has already been answered, so here are just a few minor nits.
This might be just an artifact from your example, but this will always give a warning. If the first item of @ARGV is add or multiply, it's not numeric, but it is still passed to the add() and multiply() functions.
Additionally you return \$sum instead of $sum, but you don't dereference it before printing it.
Oh, and my $rtn = multiply(@{$ref}]); has spurious ] ;-).
|
|---|