| [reply] [d/l] |
No I'm not. I did see lots on the Net about it. The annoying thing is that I'm using strict and even when I purposely dereference something that is not a reference I don't get a strict error - i.e. my %hash = (); $hash{key} = $value; print $$hash{key} does not give me an error saying the hash is not defined I get the dereferencing error but I get this error when I have got everything working and then I put in a print statement. Do you know how I can avoid this error when using references?
| [reply] |
The error message you posted is not a standard Perl warning or error. Therefore, the cause of the message is not a direct result of your code. It originates from Text::Balanced, and if you are not using that module directly, then you must be using a module that uses that module (like Parse::RecDescent or similar).
It is impossible to advise you how to correct your code, without seeing the code, but I would not suggest you post your 3000 lines here, so you are going to have to do some detective work and come up with a few lines of code that produce the same error. If you haven't solved it by the time you have reduce your code to < 30 lines, then post the lines that produce the problem and someone will be able to help you.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
I have to say, your post is pretty incoherent. Consider that last sentence of yours (with <code> tags added where they are needed):
I store references to arrays as $array[$i] = \@array.
Do you really mean that you have a line of code like that, where the same array name is used on both the left and right sides of the assignment? That sets the "$i'th" element of @array to be a reference to @array. Why would you do something like that? If you aren't doing that, then what are you really doing?
And the sentence before that:
I use my $hash = $_[i] when a hash is passed as the only or one of the arguments.
Okay, I'll assume that the missing "$" sigil for "i" is just a typo there. But then, how do you call the subroutine that contains that line, and how do you use $hash within that subroutine? Those issues are just as important.
Maybe the code you are actually trying to run does not contain the silly errors in your post -- it would be better if you showed us at least some of the actual code.
Have you ever heard about the perl debugger? Check the man page called perldebug, and try running your script like this:
perl -d your_script
(If the script takes command-line args, just include those as you normally would, after the name of the script file.) Then do things like setting break points, stepping through portions of the code, inspecting values of variables as you go, etc.
Also, if you have not done so yet, add "use Data::Dumper;" to your script. That way, when you run it with the debugger, you can do things like:
print Dumper( $some_ref_variable )
as commands to the debugger itself, to see whether the references are working and the data structures are coming out the way you expect them to. | [reply] [d/l] [select] |
use Devel::Trace, and figure out where the message is coming from. | [reply] |
FYI: I've been googling your question, and I haven't been able to find anything about offset 8231, at least in Perl. I did get some info about 8231 on the Microsoft site. According to the Win site that I was on, offset 8231 is:
offset 8231 the requested authentication method is not supported by the server
Are you on Windows? I can't tell, so you need to be more precise. I would change course here and take the advice in the previous replies to heart. Use Text::Balanced as a starting point.
| [reply] |
| [reply] |