in reply to Adding Numbers

When I run your program, and enter the numbers '3' and '7', the output I get is:

44444444444444444444444444444444444444444444444444444444444444444444444444444444
44444444444444444444444444444444444444444444444444444444444444444444444444444444
44444444444444444444444444444444444444444444444444444444444444444444444444444444
44444444444444444444444444444444444444444444444444444444444444444444444444444444
44444444444444444444444444444444444444444444444444444444444444444444444444444444
44444444444444444444444444444444444444444444444444444444444444444444444444444444
44444444444444444444444444444444444444444444444444444444444444444444444444444444
44444444444444444444444444444444444444444444444444444444444444444444444444444444
44444444444444444444444444444444444444444444444444444444444444444444444444444444
44444444444444444444444444444444444444444444444444444444444444444444444444444444

At that point I pressed Control-C to interupt the program.

Is that what you got? Is that the result you were expecting? In what way did my experience differ from your expectations?

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

Replies are listed 'Best First'.
Re^2: Adding Numbers
by NastyPenguin (Initiate) on Nov 21, 2010 at 06:17 UTC
    the output i'm looking for, given '3' and '7' is 3,4,5,6,7
      my @range = 3 .. 7;
      True laziness is hard work

      You want the result to be '3 4 5 6 7' and the actual result is '4 4 4 4 4 ...'. So there's two things wrong, the first is that you start at '$ipa + 1' rather than at '$ipa'. What's the second thing that's wrong?

      As Occam said: Entia non sunt multiplicanda praeter necessitatem.