http://qs321.pair.com?node_id=571948


in reply to Re: Missing $ on loop variable at measurements2.pl line 69.
in thread Missing $ on loop variable at measurements2.pl line 69.

sorted thanks!
however...
now i get:
Use of uninitialized value in int at measurements2.pl line 42. Use of uninitialized value in int at measurements2.pl line 42. Use of uninitialized value in int at measurements2.pl line 42. Use of uninitialized value in int at measurements2.pl line 42. Use of uninitialized value in int at measurements2.pl line 42. Use of uninitialized value in int at measurements2.pl line 42. Use of uninitialized value in int at measurements2.pl line 42. Use of uninitialized value in division (/) at measurements2.pl line 63 +. Use of uninitialized value in division (/) at measurements2.pl line 63 +. Use of uninitialized value in division (/) at measurements2.pl line 63 +. Use of uninitialized value in division (/) at measurements2.pl line 63 +. Use of uninitialized value in addition (+) at measurements2.pl line 60 +. Use of uninitialized value in division (/) at measurements2.pl line 63 +. Use of uninitialized value in division (/) at measurements2.pl line 63 +. Use of uninitialized value in division (/) at measurements2.pl line 63 +. Use of uninitialized value in addition (+) at measurements2.pl line 60 +.

Replies are listed 'Best First'.
Re^3: Missing $ on loop variable at measurements2.pl line 69.
by davorg (Chancellor) on Sep 08, 2006 at 12:54 UTC

    That means that in various calculations (on the indicated lines) you are trying to use a value from a variable that you haven't previously put a value in. This is often indicative of a problem in the logic of your program.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^3: Missing $ on loop variable at measurements2.pl line 69.
by mk. (Friar) on Sep 08, 2006 at 13:10 UTC
    this happens because you haven't assigned any value to $person_count (only to $vision_total).
    try changing my ($vision_total,$person_count)=0; to my ($vision_total,$person_count)=(0,0);


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    "one who asks a question is a fool for five minutes; one who does not ask a question remains a fool forever."

    mk at rio dot pm dot org
      thank you.. i just learnt a lot from your post!!!