Since others have helped solve your problem, I thought I'd point out that the List::Util core module has a sum function equivalent to your calcsum function:
use strict;
use warnings;
use List::Util qw(sum);
my @userArray = <STDIN>;
my $sum = sum(@userArray);
print "Sum $sum\n";