in reply to Returning Values from Subroutines
your sum is in $result, so return $result
update: no need for '&' before add