### Re^2: Missing \$ on loop variable at measurements2.pl line 69.

by Yoda_Oz (Sexton)
 on Sep 08, 2006 at 12:37 UTC ( #571948=note: print w/replies, xml ) Need Help??

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!!!

Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://571948]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2022-05-27 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Do you prefer to work remotely?

Results (94 votes). Check out past polls.

Notices?