in reply to Re^2: Understanding variable scope in perl
in thread Understanding variable scope in perl

Ouch!!

Now you see why you've got to show ALL the code, lest the words "(all this is actually in a while loop not posted)" come back to sting you!

A final point -- don't ever submit code that you need reviewed by typing it in by hand (as I think you may have done to convert the loop variable to an actual value).  Always cut and paste!  Otherwise, even if the error is somewhere within the submission, you may "mentally fix the error" when you type it in, and nobody else will ever see it.

Good luck!

  • Comment on Re^3: Understanding variable scope in perl