For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > July 2005 > Re: length of an array in a struct in an array of structs in a struct









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: length of an array in a struct in an array of structs in a struct
Billy N. Patton

2005-07-28, 5:01 pm

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
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com