in reply to Newbie Errors - Uninitialized Values

copied, pasted, ran..no problem. What errors are you getting exactly. I didn't check the results for accuracy, but I didn't get any errors, so maybe you could be a little more verbose

C-.

Replies are listed 'Best First'.
Re: Re: Newbie Errors
by Anonymous Monk on May 30, 2001 at 07:22 UTC
    When I run my script, I get this as output:
    Use of uninitialized value in cos at ./vectors.pl line 19, <VECTORS> l +ine 4. Use of uninitialized value in multiplication (*) at ./vectors.pl line +19, <VECTORS> line 4. Use of uninitialized value in cos at ./vectors.pl line 20, <VECTORS> l +ine 4. Use of uninitialized value in multiplication (*) at ./vectors.pl line +20, <VECTORS> line 4. Use of uninitialized value in sin at ./vectors.pl line 24, <VECTORS> l +ine 4. Use of uninitialized value in multiplication (*) at ./vectors.pl line +24, <VECTORS> line 4. Use of uninitialized value in sin at ./vectors.pl line 25, <VECTORS> l +ine 4. Use of uninitialized value in multiplication (*) at ./vectors.pl line +25, <VECTORS> line 4. 6.25584093881723 0 10.2844455635215 0
    If I leave out the '-w' option, the nasty messages go away but the useless zeros after meaningful input don't. I'll have to take a look at those in the morning.
      You should never simply take out -w or use strict; to get rid of an error or warning. by doing so, you haven't really gotten rid of the error, you've simply suppressed the message saying that there is such an error. Doing this is just asking for more errors and instability to crop up without you knowing it.

      - Sherlock

      Skepticism is the source of knowledge as much as knowledge is the source of skepticism.