in reply to Having problems with addition in sub

Another tidbit: you don't need the ampersand to make a call. In fact, it can cause problems in some cases. Just call a sub by its name, offering the desired arguments.
my $fred_total = total(@fred);

[useless update: this is my 900th writeup]
--
[ e d @ h a l l e y . c c ]