XP is just a number | |
PerlMonks |
Re: Missing $ on loop variable at measurements2.pl line 69.by imp (Priest) |
on Sep 08, 2006 at 12:42 UTC ( [id://571949]=note: print w/replies, xml ) | Need Help?? |
In this particular case it was easy for us to find the error, but in the future please only post the smallest segment of relevant code that still produces the error. Please read How (not) to ask a question - Only Post Relevant Code for an explanation.
If you aren't sure what code is relevant, start with the line number that was reported as having the error. The error message you reported said line 69, but when I run the code locally perl reports that the failure is on line 74 - which means the code provided is not the code that triggered the error. Line 74 is: Which you could reduce to a minimal working example by just providing an empty loop body: Many times you will find that when you reduce the script to the smallest segment that still produces the error, the cause of the error becomes obvious. Note that sometimes the reported line number is misleading, which is often the case when the issue is a missing (or extra) curly bracket, quote, or semi-colon. In those cases you need to iteratively reduce the code until the error no longer occurs, then backstep to see what block contained the error.
In Section
Seekers of Perl Wisdom
|
|