Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It took me a minute or three to figure out what the problem was. Correct me if I'm wrong: When you run the code, you get a "Can't use an undefined value as an ARRAY reference at scriptname.pl line 21" error and you aren't sure why. I can answer that part -- but what I can't answer is exactly what you're trying to do. The for loop is iterating from 0 to the maximum index in $ref_a. That reference is larger than what you'll find in $ref_b. Some simple print statement debugging will help show what I mean:
With some output:
To correct this problem, you can just choose the minimum of the two ref_a/b indices. But since I don't know what your goal is, I don't know if this will correct your issue. In reply to Re: Undefined Array Reference
by Nkuvu
|
|