lamp has asked for the wisdom of the Perl Monks concerning the following question:
and i am using the following code to get the total$VAR1 = [ { 'columns' => [ { 'test' => '87588', 'test1' => '87588', 'test2' => '0' }, { 'test' => '87588', 'test1' => '87588', 'test2' => '0' }, ] } ];
Is there any method to avoid double looping?.map { map{ $total_value += $_->{test1} ; } @{$_->{columns}}; } @{$testsub->result()}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to avoid nested looping?
by bgreenlee (Friar) on Feb 04, 2005 at 06:18 UTC | |
by Ovid (Cardinal) on Feb 04, 2005 at 06:38 UTC | |
by bgreenlee (Friar) on Feb 04, 2005 at 07:01 UTC | |
by Ovid (Cardinal) on Feb 04, 2005 at 08:09 UTC | |
by lidden (Curate) on Feb 04, 2005 at 12:02 UTC | |
by bgreenlee (Friar) on Feb 04, 2005 at 13:55 UTC | |
by tphyahoo (Vicar) on Feb 04, 2005 at 11:27 UTC | |
by Anonymous Monk on Feb 04, 2005 at 10:15 UTC | |
|
Re: how to avoid nested looping?
by davido (Cardinal) on Feb 04, 2005 at 06:39 UTC | |
|
Re: how to avoid nested looping?
by dimar (Curate) on Feb 04, 2005 at 08:27 UTC |