On Thu, Jun 12, 2008 at 9:37 PM, Christopher Morgan <[EMAIL PROTECTED]> wrote:

> This list can vary in size from element to element, so I would like a way to
> refer to the list in scalar context to get its size. How do I do that?
>

Hi,

since $fields[0]->{'_subfields'} is an anonymous array,
you can derefer it by saying,

@{ $fields[0]->{'_subfields'} };

So,

scalar @{ $fields[0]->{'_subfields'} };

will get its length.

-- 
Jeff Peng - [EMAIL PROTECTED]
Professional Squid supports in China
http://www.ChinaSquid.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to