Re: length of an array in a struct in an array of structs in a struct in an array of structs



Tuan Bui wrote:
Hello,

So I have this complex data structure I've built for myself, and I'm
trying to get this snippet to work:

$k <
scalar(@{@{@VisitArray[$i]->PSearchStructArray[$j]->ClickPathArray}})


Ths should do it. $l=scalar(@{$VisitArray[$i]->PSearchStructArray[$j]->ClickPathArray});


VisitArray is an array of VisitStructs.  Each VisitStruct contains an
array of PSearchStructs called PSearchStructArray. Each PSearchStruct
contains an array called ClickPathArray.  I'm trying to get the length
of ClickPathArray out. I've tried numerous variations of that line, and
none of them work.  I do know that

scalar(@{@VisitArray[$i]->PSearchStructArray})

will return the length of PSearchStructArray well enough though.

I'm helplessly floundering here - hope one of you perl hackers can
help.  Anyone who does help will earn my undying gratitude :)

Tuan

.