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:
(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.perl -d your_script
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:
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.print Dumper( $some_ref_variable )
In reply to Re: Did not find leading dereferencer, detected at offset 8231
by graff
in thread Did not find leading dereferencer, detected at offset 8231
by sean_james_barry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |