in reply to Subroutine help

  1. put code in <code> code here </code> tags
  2. copy/paste error message
  3. function calls do not work inside strings, they don't interpolate like variables, so
    printf "Equals to: %s\n", add();
  4. @_ is an array, so just iterate over it
    my $sum = 0; foreach(@_){ $sum += $_; }