| [reply] |
No. According to the docs:
av_len
Returns the highest index in the array.
It's basically the equivalent of Perl's $#{ aref }, hence the unusual condition. I think if I could pursuade it to start at the right place, it would stop correctly too. I just cannot see why it doesn't?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |
Then, you shouldn't printf( "Item %d has %d elements\n", i, av_len( av ) );, if it has in fact av_len(av)+1 (i.e. 10). :)
Anyhow, I think the problem is with reading the string out of sv2 — at least I don't get any sensible values here at all, like 'A'..'J' (only random junk out of memory instead). I'll take a closer look ... well, no longer required, syphilis has already done so (—> av_fetch is returning an SV**, not SV*)
| [reply] [d/l] [select] |
shouldn't printf( "Item %d has %d elements\n", i, av_len( av ) );, if it has in fact av_len(av)+1 (i.e. 10). :)
Yes. Lazy debug :0
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |