On Tuesday, January 7, 2003, at 09:02  PM, Peter Scott wrote:
You made a false economy by not using strict.  Yes, you would have to
fix those errors - mostly due to not declaring *everything* with
'my'.  But to leave it out is to shoot yourself in the foot.

You have managed to blow your whole leg off with a .22.
I appreciate your keen eye for my nonsensical }s typo. I had tried "use strict" in an earlier version, but got errors I could not decipher. Adding back "use strict" and troubleshooting away some other errors, I get as error #1:
"my" variable @rawRollArray masks earlier declaration in same scope at ./nudice-strict_test line 114.

Line 114 (which now points to the right line, thank you so much!!) only shifts an element off of @rawRollArray, which has been declared as a "my" variable earlier on:

my @rawRollArray = roll(@currentRollRequest); # produces raw roll array from roll request array
while @rawRollArray {
my $thisRoll = shift(@rawRollArray); # holds one die roll to be subjected to per-die min/max rules
...
}

Since I could make nothing of this sort of "error" I gave it up, looking instead for errors of which I could make some sense. One way I sought to eliminate this was to eliminate all the "my" variables, which in turn required me to ditch "use strict" which began to complain mightily ... which is how I got a pile of (garbage) code with "use strict" commented out. Can you direct me to a resource which will help me to see what needs to happen here? From my cursory view, it seems any subsequent mention or use of a properly declared "my" variable will result in the error that it "masks earlier declaration in same statement at ..."

Help! What to do?

Thanks again,
Chris


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to