Re: prob w/anonymous array

2009-05-20 Thread pablo
On Wed, May 20, 2009 at 05:00:24PM -0400, Chas. Owens wrote: > On Wed, May 20, 2009 at 16:50, wrote: > snip > >    for my $i ($client->{count}) { > snip > > The problem is one of precedence, dereferencing with @ takes > precedence over ->, so Perl sees > > for my $i (@{$client}->{count}) { > >

Re: prob w/anonymous array

2009-05-20 Thread David Moreno
On May 20, 2009, at 4:50 PM, pa...@compugenic.com wrote: I have the following data structure defined: my @clients = ( { name=> 'joe', count => [ qw( one two three ) ] } ); Then I try running the following routine: for my $client (@clients) { for my $i ($client->{

Re: prob w/anonymous array

2009-05-20 Thread Telemachus
On Wed May 20 2009 @ 1:50, pa...@compugenic.com wrote: > I have the following data structure defined: > > my @clients = ( > { > name=> 'joe', > count => [ qw( one two three ) ] > } > ); > > Then I try running the following routine: > > for my $client (@clients) { >

Re: prob w/anonymous array

2009-05-20 Thread Chas. Owens
On Wed, May 20, 2009 at 16:50, wrote: snip >    for my $i ($client->{count}) { snip The problem is one of precedence, dereferencing with @ takes precedence over ->, so Perl sees for my $i (@{$client}->{count}) { The solution is to use @{} to tell Perl what expression to use to produce the refe