in reply to Re: Mapping Logic
in thread Mapping Logic
Using the code above, the rows are correctly highlighted according to whether or not the 5th item is greater or less than zero. However only about half of the data is printed out. When I sub the (++$i % 2) back into the code, all of the data is printed out. Any idea why?my $rows = [ map { my $row = $_; (@{$row}[5]>= 0) ? { ODD => [ map { {VALUE => $_} } @{$row} ] } : { EVEN => [ map { {VALUE => $_} } @{$row} ] } } @{$data} ];
|
|---|