in reply to Adding Numbers

If you'd actually run this code, you would have seen:

Useless use of private variable in void context at <scriptname> line 1 +5.

Perl is telling you what's wrong and where the problem is. Perhaps you could at least make some minimal effort before posting here. There's only 5 characters on line 15 - hardly a major debugging task.

If you didn't understand the message, then that should have been your question. And, if that is the case, add use diagnostics; to the top of your code to get more verbose messages.

Please read: How do I post a question effectively?

-- Ken

Replies are listed 'Best First'.
Re^2: Adding Numbers
by NastyPenguin (Initiate) on Nov 21, 2010 at 05:47 UTC
    That still hasn't answer my question. Whilst i've read the diagnostics I still dont understand why I can't list a range of numbers from variable a to variable b.

      I am still of the opinion that you have not run this code.

      So, try running the code you have shown here and post the prompts, the first and last values you enter and the output including any error messages.

      Of course, if you do actually run it, the problem might become obvious.

      -- Ken