in reply to How do I write a program that calculates the sum of all numbers to a number, n?

A few clues, you will need an infinite loop, and you will need to read and sum user input. Hope that helps

EDIT: And depending on how you want to do this, you can either set it up to accept one set of numbers per loop, or you can input them all at once with a "+" in between them like "1+2+21+46+3+5" (second example). You would need to split user input to an array, then sum the array.
use strict; use warnings; my $sum = 0; while(1){ print "Please input a number: "; chomp(my $number = <STDIN>); add $number to $sum; print "Your sum is now: $sum"; }
OR
use strict; use warnings; print "Please input your string of numbers seperated by "+"; my @array = split(/[+]/, <STDIN>); my $sum = 0; foreach(@array){ add each number to the $sum } print "This is your sum: $sum";
This is non usable code and used only as a reference, Good Luck!