I would like to modify the (++$i % 2) line. I have a $results variable and would like to map to the ODD output when the $results var is greater than zero and to the EVEN when the $results var is less than zero. I tried just replacing (++$i % 2) with $results>0) but that didn't work. Any suggestions? Thanks.my $rows = [ map { my $row = $_; (++$i % 2) ? { ODD => [ map { {VALUE => $_} } @{$row} ] } : { EVEN => [ map { {VALUE => $_} } @{$row} ] } } @{$data} ];
In reply to Mapping Logic by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |